Commit 197123b3 authored by Rolf Pfeffertal's avatar Rolf Pfeffertal

add option to not add pistache as an install target

parent 863eba92
......@@ -4,6 +4,7 @@ include(CheckCXXCompilerFlag)
option(PISTACHE_BUILD_TESTS "build tests alongside the project" OFF)
option(PISTACHE_BUILD_EXAMPLES "build examples alongside the project" OFF)
option(PISTACHE_INSTALL "add pistache as install target (recommended)" ON)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
......
......@@ -28,7 +28,8 @@ set(bin_install_dir "bin/")
target_link_libraries(pistache pthread)
install(
if (PISTACHE_INSTALL)
install(
TARGETS pistache
EXPORT ${targets_export_name}
ARCHIVE DESTINATION ${lib_install_dir}
......@@ -36,27 +37,28 @@ install(
RUNTIME DESTINATION ${bin_install_dir}
INCLUDES DESTINATION ${include_install_dir})
install(
install(
DIRECTORY "${PROJECT_SOURCE_DIR}/include/pistache"
DESTINATION ${include_install_dir}
FILES_MATCHING PATTERN "*.*h")
install(TARGETS pistache
install(TARGETS pistache
EXPORT PistacheTargets
DESTINATION lib)
install(EXPORT PistacheTargets
install(EXPORT PistacheTargets
DESTINATION "lib/cmake/pistache"
EXPORT_LINK_INTERFACE_LIBRARIES
COMPONENT cmake-config
)
)
include(CMakePackageConfigHelpers)
configure_package_config_file(
include(CMakePackageConfigHelpers)
configure_package_config_file(
"PistacheConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/PistacheConfig.cmake"
INSTALL_DESTINATION "lib/cmake/pistache"
)
install(
)
install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/PistacheConfig.cmake"
DESTINATION "lib/cmake/pistache"
COMPONENT cmake-config
)
)
endif()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment