From 43b96824657c49545afc7a3bdfc271bad736279c Mon Sep 17 00:00:00 2001 From: Harald Date: Mon, 26 Jun 2017 12:14:12 +0200 Subject: [PATCH] add make install target --- CMakeLists.txt | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d2ccff2f..0d4f7e90 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,7 +69,24 @@ else() APPEND_STRING PROPERTY COMPILE_FLAGS " -O3") endif() -target_include_directories(rapidcheck PUBLIC include) + + +target_include_directories(rapidcheck PUBLIC + $ + $ # /include/rapidcheck +) + +include(GNUInstallDirs) +install(TARGETS rapidcheck EXPORT rapidcheckConfig + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) # This is for Windows +install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + +install(EXPORT rapidcheckConfig DESTINATION share/rapidcheck/cmake) + +export(TARGETS rapidcheck FILE rapidcheckConfig.cmake) + add_subdirectory(ext)