CMakeLists for Faddeeva

Former-commit-id: 26b0e909cc50ca962b83d411f67a98f2a21cf259
This commit is contained in:
Marek Nečada 2020-05-14 15:29:20 +03:00
parent 206f8b65a1
commit 43c2de4f35
3 changed files with 24 additions and 0 deletions

View File

@ -42,6 +42,10 @@ else (QPMS_USE_FORTRAN_AMOS)
set(QPMS_AMOSLIB camos) set(QPMS_AMOSLIB camos)
endif (QPMS_USE_FORTRAN_AMOS) endif (QPMS_USE_FORTRAN_AMOS)
set(FADDEEVA_BUILD_STATIC ON)
add_subdirectory(faddeeva)
add_subdirectory (qpms) add_subdirectory (qpms)

19
faddeeva/CMakeLists.txt Normal file
View File

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

View File

@ -27,6 +27,7 @@ target_link_libraries (qpms
lapack lapack
blas blas
${QPMS_AMOSLIB} ${QPMS_AMOSLIB}
Faddeeva
) )
target_include_directories (qpms PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) target_include_directories (qpms PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})