mirror of
https://github.com/gwm17/catima.git
synced 2025-02-17 01:48:50 -05:00
cmakelist
This commit is contained in:
parent
75e1337223
commit
e9e64c26a3
|
@ -35,7 +35,7 @@ endif()
|
||||||
|
|
||||||
############# Requirements ##################
|
############# Requirements ##################
|
||||||
find_package(GSL REQUIRED)
|
find_package(GSL REQUIRED)
|
||||||
|
MESSAGE(STATUS "GSL include dirs: " ${GSL_INCLUDE_DIRS})
|
||||||
#if(THREADS)
|
#if(THREADS)
|
||||||
# find_package(Threads REQUIRED)
|
# find_package(Threads REQUIRED)
|
||||||
# set (EXTRA_LIBS ${EXTRA_LIBS} ${CMAKE_THREAD_LIBS_INIT})
|
# set (EXTRA_LIBS ${EXTRA_LIBS} ${CMAKE_THREAD_LIBS_INIT})
|
||||||
|
@ -64,10 +64,22 @@ file(GLOB GLOBAL_SOURCES global/*.c)
|
||||||
LIST (APPEND SOURCES ${GLOBAL_SOURCES})
|
LIST (APPEND SOURCES ${GLOBAL_SOURCES})
|
||||||
endif(GLOBAL)
|
endif(GLOBAL)
|
||||||
file(GLOB HEADERS *.h)
|
file(GLOB HEADERS *.h)
|
||||||
|
|
||||||
add_library(catima SHARED ${SOURCES})
|
add_library(catima SHARED ${SOURCES})
|
||||||
add_library(catima_static STATIC ${SOURCES})
|
add_library(catima_static STATIC ${SOURCES})
|
||||||
set_target_properties(catima_static PROPERTIES OUTPUT_NAME catima POSITION_INDEPENDENT_CODE ON)
|
set_target_properties(catima_static PROPERTIES OUTPUT_NAME catima POSITION_INDEPENDENT_CODE ON)
|
||||||
target_link_libraries(catima ${EXTRA_LIBS} ${GSL_LIBRARIES} )
|
target_link_libraries(catima ${EXTRA_LIBS} ${GSL_LIBRARIES} )
|
||||||
|
target_link_libraries(catima_static ${EXTRA_LIBS} ${GSL_LIBRARIES})
|
||||||
|
|
||||||
|
target_include_directories(catima
|
||||||
|
PUBLIC $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
|
||||||
|
$<BUILD_INTERFACE:${GSL_INCLUDE_DIRS}>
|
||||||
|
)
|
||||||
|
target_include_directories(catima_static
|
||||||
|
PUBLIC $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
|
||||||
|
$<BUILD_INTERFACE:${GSL_INCLUDE_DIRS}>
|
||||||
|
)
|
||||||
|
|
||||||
FILE(COPY ${HEADERS} DESTINATION ${PROJECT_BINARY_DIR}/include/catima)
|
FILE(COPY ${HEADERS} DESTINATION ${PROJECT_BINARY_DIR}/include/catima)
|
||||||
|
|
||||||
# the compiler used for C++ files
|
# the compiler used for C++ files
|
||||||
|
@ -108,8 +120,6 @@ if(CATIMA_PYTHON)
|
||||||
endif(CATIMA_PYTHON )
|
endif(CATIMA_PYTHON )
|
||||||
|
|
||||||
########## Sub Directories ###########
|
########## Sub Directories ###########
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
|
||||||
include_directories("${PROJECT_BINARY_DIR}/include")
|
|
||||||
if(EXAMPLES)
|
if(EXAMPLES)
|
||||||
file(GLOB EXAMPLES examples/*.cpp)
|
file(GLOB EXAMPLES examples/*.cpp)
|
||||||
FILE(COPY ${EXAMPLES} DESTINATION ${PROJECT_BINARY_DIR}/examples)
|
FILE(COPY ${EXAMPLES} DESTINATION ${PROJECT_BINARY_DIR}/examples)
|
||||||
|
@ -147,7 +157,6 @@ install (TARGETS catima catima_static
|
||||||
ARCHIVE DESTINATION lib)
|
ARCHIVE DESTINATION lib)
|
||||||
install (FILES ${headers} DESTINATION include/catima)
|
install (FILES ${headers} DESTINATION include/catima)
|
||||||
|
|
||||||
|
|
||||||
###### packaging #######
|
###### packaging #######
|
||||||
set(CPACK_PACKAGE_NAME "catima")
|
set(CPACK_PACKAGE_NAME "catima")
|
||||||
set(CPACK_PACKAGE_VENDOR "A. Prochazka")
|
set(CPACK_PACKAGE_VENDOR "A. Prochazka")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user