1
0
Fork 0
mirror of https://github.com/gwm17/catima.git synced 2024-11-23 02:38:51 -05:00
This commit is contained in:
hrocho 2018-04-18 01:19:29 +02:00
parent 0e07dddaaf
commit 45920caab9

View File

@ -34,6 +34,8 @@ else()
set(RPATH_VARIABLE "LD_LIBRARY_PATH") set(RPATH_VARIABLE "LD_LIBRARY_PATH")
endif() endif()
MESSAGE(STATUS "install prefix: " ${CMAKE_INSTALL_PREFIX})
############# Requirements ################## ############# Requirements ##################
find_package(GSL REQUIRED) find_package(GSL REQUIRED)
MESSAGE(STATUS "GSL include dirs: " ${GSL_INCLUDE_DIRS}) MESSAGE(STATUS "GSL include dirs: " ${GSL_INCLUDE_DIRS})
@ -50,8 +52,8 @@ if(PYTHONINTERP_FOUND)
endif() endif()
configure_file( configure_file(
"${PROJECT_SOURCE_DIR}/build_config.in" "${CMAKE_CURRENT_SOURCE_DIR}/build_config.in"
"${PROJECT_BINARY_DIR}/include/catima/build_config.h" "${CMAKE_CURRENT_BINARY_DIR}/include/catima/build_config.h"
) )
configure_file("${PROJECT_SOURCE_DIR}/init.sh.in" configure_file("${PROJECT_SOURCE_DIR}/init.sh.in"
@ -80,6 +82,8 @@ target_include_directories(catima_static
PUBLIC $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include> PUBLIC $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
$<BUILD_INTERFACE:${GSL_INCLUDE_DIRS}> $<BUILD_INTERFACE:${GSL_INCLUDE_DIRS}>
) )
add_library(catima::catima ALIAS catima)
add_library(catima::catima_static ALIAS catima_static)
FILE(COPY ${HEADERS} DESTINATION ${PROJECT_BINARY_DIR}/include/catima) FILE(COPY ${HEADERS} DESTINATION ${PROJECT_BINARY_DIR}/include/catima)
@ -158,11 +162,22 @@ endif(APPS)
####### install part ####### ####### install part #######
FILE(GLOB headers "*.h") FILE(GLOB headers "*.h")
include(GNUInstallDirs)
install (TARGETS catima catima_static install (TARGETS catima catima_static
LIBRARY DESTINATION lib EXPORT catimaConfig
ARCHIVE DESTINATION lib) LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
install (FILES ${headers} DESTINATION include/catima) install (FILES ${headers} DESTINATION include/catima)
install(EXPORT catimaConfig
NAMESPACE catima::
DESTINATION lib/cmake/catima
)
export(TARGETS catima catima_static NAMESPACE catima:: FILE catimaConfig.cmake)
export(PACKAGE 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")