diff options
author | Mathias Preiner <mathias.preiner@gmail.com> | 2018-09-24 11:44:41 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-24 11:44:41 -0700 |
commit | 7bfcbebe0f7db7d336cae04ccdfdc3c2b1aff69b (patch) | |
tree | 94737563af211d79513f353c5f5c86a72c849fcf /src/main | |
parent | 87e6a08ff94c74d13453c76adaba8f729c7a958c (diff) |
cmake: Add program prefix option. (#2515)
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/CMakeLists.txt | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/main/CMakeLists.txt b/src/main/CMakeLists.txt index 30a246ba0..dba12006e 100644 --- a/src/main/CMakeLists.txt +++ b/src/main/CMakeLists.txt @@ -45,7 +45,12 @@ set_target_properties(cvc4-bin OUTPUT_NAME cvc4 RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) target_link_libraries(cvc4-bin cvc4 cvc4parser) -install(TARGETS cvc4-bin DESTINATION bin) +if(PROGRAM_PREFIX) + install(PROGRAMS + $<TARGET_FILE:cvc4-bin> DESTINATION bin RENAME ${PROGRAM_PREFIX}cvc4) +else() + install(TARGETS cvc4-bin DESTINATION bin) +endif() # In order to get a fully static executable we have to make sure that we also # use the static system libraries. @@ -76,7 +81,12 @@ if(ENABLE_PORTFOLIO) RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) target_link_libraries(pcvc4-bin cvc4 cvc4parser ${Boost_LIBRARIES}) target_include_directories(pcvc4-bin PRIVATE ${Boost_INCLUDE_DIRS}) - install(TARGETS pcvc4-bin DESTINATION bin) + if(PROGRAM_PREFIX) + install(PROGRAMS + $<TARGET_FILE:pcvc4-bin> DESTINATION bin RENAME ${PROGRAM_PREFIX}pcvc4) + else() + install(TARGETS pcvc4-bin DESTINATION bin) + endif() if(NOT ENABLE_SHARED) set_target_properties(pcvc4-bin PROPERTIES LINK_FLAGS -static) |