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})