diff options
author | Mathias Preiner <mathias.preiner@gmail.com> | 2019-09-25 09:47:12 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-25 09:47:12 -0700 |
commit | 4f384b6fadd999324d83b4c4ea900de2a0e13dd7 (patch) | |
tree | d62683a66ede8c7a0ee04e8b67ee999aa71342ea /CMakeLists.txt | |
parent | f892370a615ecadc011b49a98d2c4695fafa7f4f (diff) |
Use separate CMake project for CVC4 examples. (#3196)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b6bc5b452..706ef51f2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,6 +31,14 @@ set(CMAKE_CXX_STANDARD 11) # plugins. set(CMAKE_EXPORT_COMPILE_COMMANDS ON) +#-----------------------------------------------------------------------------# + +set(INCLUDE_INSTALL_DIR include) +set(LIBRARY_INSTALL_DIR lib) +set(RUNTIME_INSTALL_DIR bin) + +#-----------------------------------------------------------------------------# + # Embed the installation prefix as an RPATH in the executable such that the # linker can find our libraries (such as libcvc4parser) when executing the cvc4 # binary. This is for example useful when installing CVC4 with a custom prefix @@ -40,7 +48,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # # More information on RPATH in CMake: # https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/RPATH-handling -set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") +set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIBRARY_INSTALL_DIR}") #-----------------------------------------------------------------------------# @@ -450,7 +458,6 @@ if(ENABLE_PROOFS) endif() add_subdirectory(doc) -add_subdirectory(examples EXCLUDE_FROM_ALL) # excluded from all target add_subdirectory(src) add_subdirectory(test) @@ -468,12 +475,13 @@ include(CMakePackageConfigHelpers) install(EXPORT cvc4-targets FILE CVC4Targets.cmake NAMESPACE CVC4:: - DESTINATION lib/cmake/CVC4) + DESTINATION ${LIBRARY_INSTALL_DIR}/cmake/CVC4) configure_package_config_file( ${CMAKE_SOURCE_DIR}/cmake/CVC4Config.cmake.in ${CMAKE_BINARY_DIR}/cmake/CVC4Config.cmake - INSTALL_DESTINATION lib/cmake/CVC4 + INSTALL_DESTINATION ${LIBRARY_INSTALL_DIR}/cmake/CVC4 + PATH_VARS LIBRARY_INSTALL_DIR ) write_basic_package_version_file( @@ -485,7 +493,7 @@ write_basic_package_version_file( install(FILES ${CMAKE_BINARY_DIR}/cmake/CVC4Config.cmake ${CMAKE_BINARY_DIR}/CVC4ConfigVersion.cmake - DESTINATION lib/cmake/CVC4 + DESTINATION ${LIBRARY_INSTALL_DIR}/cmake/CVC4 ) |