Update CMakeLists
This commit is contained in:
@@ -83,6 +83,43 @@ MESSAGE(STATUS "Testing enabled")
|
||||
add_subdirectory(tests)
|
||||
endif (ENABLE_TESTING)
|
||||
|
||||
|
||||
|
||||
#############################################################################################
|
||||
#############################################################################################
|
||||
install(TARGETS bayesnet
|
||||
EXPORT bayesnetTargets
|
||||
ARCHIVE DESTINATION lib
|
||||
LIBRARY DESTINATION lib
|
||||
RUNTIME DESTINATION bin
|
||||
)
|
||||
|
||||
install(EXPORT bayesnetTargets
|
||||
FILE bayesnetTargets.cmake
|
||||
NAMESPACE bayesnet::
|
||||
DESTINATION lib/cmake/bayesnet
|
||||
)
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
|
||||
configure_package_config_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/bayesnetConfig.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/bayesnetConfig.cmake"
|
||||
INSTALL_DESTINATION lib/cmake/bayesnet
|
||||
)
|
||||
|
||||
install(FILES
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/bayesnetConfig.cmake"
|
||||
DESTINATION lib/cmake/bayesnet
|
||||
)
|
||||
install(DIRECTORY bayesnet/ DESTINATION include/bayesnet FILES_MATCHING CONFIGURATIONS Release PATTERN "*.h")
|
||||
install(FILES ${CMAKE_BINARY_DIR}/configured_files/include/bayesnet/config.h DESTINATION include/bayesnet CONFIGURATIONS Release)
|
||||
|
||||
#############################################################################################
|
||||
#############################################################################################
|
||||
|
||||
|
||||
|
||||
# Installation
|
||||
# ------------
|
||||
# install(TARGETS BayesNet
|
||||
|
4
cmake/bayesnetConfig.cmake.in
Normal file
4
cmake/bayesnetConfig.cmake.in
Normal file
@@ -0,0 +1,4 @@
|
||||
@PACKAGE_INIT@
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/bayesnetTargets.cmake")
|
||||
|
Reference in New Issue
Block a user