From 43c2de4f35a137a95aeb88d438a79ac662340586 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ne=C4=8Dada?= Date: Thu, 14 May 2020 15:29:20 +0300 Subject: [PATCH] CMakeLists for Faddeeva Former-commit-id: 26b0e909cc50ca962b83d411f67a98f2a21cf259 --- CMakeLists.txt | 4 ++++ faddeeva/CMakeLists.txt | 19 +++++++++++++++++++ qpms/CMakeLists.txt | 1 + 3 files changed, 24 insertions(+) create mode 100644 faddeeva/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index be4752c..7566bb8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,6 +42,10 @@ else (QPMS_USE_FORTRAN_AMOS) set(QPMS_AMOSLIB camos) endif (QPMS_USE_FORTRAN_AMOS) + +set(FADDEEVA_BUILD_STATIC ON) +add_subdirectory(faddeeva) + add_subdirectory (qpms) diff --git a/faddeeva/CMakeLists.txt b/faddeeva/CMakeLists.txt new file mode 100644 index 0000000..831778a --- /dev/null +++ b/faddeeva/CMakeLists.txt @@ -0,0 +1,19 @@ +cmake_minimum_required(VERSION 3.0) +include(GNUInstallDirs) + +project(Faddeeva VERSION 1.0 LANGUAGES C) + +option(FADDEEVA_BUILD_STATIC "Build Faddeeva as static library" OFF) + +if (FADDEEVA_BUILD_STATIC) + add_library(Faddeeva STATIC Faddeeva.h Faddeeva.c Faddeeva.cc) +else (FADDEEVA_BUILD_STATIC) + add_library(Faddeeva SHARED Faddeeva.c) + set_target_properties(Faddeeva PROPERTIES PUBLIC_HEADER "Faddeeva.h") + install(TARGETS Faddeeva + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +endif (FADDEEVA_BUILD_STATIC) +target_include_directories(Faddeeva PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) + + diff --git a/qpms/CMakeLists.txt b/qpms/CMakeLists.txt index b2ae47b..01284bd 100644 --- a/qpms/CMakeLists.txt +++ b/qpms/CMakeLists.txt @@ -27,6 +27,7 @@ target_link_libraries (qpms lapack blas ${QPMS_AMOSLIB} + Faddeeva ) target_include_directories (qpms PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})