set(LFSC_DIR "" CACHE STRING "Set LFSC install directory")
set(SYMFPU_DIR "" CACHE STRING "Set SymFPU install directory")
+# Prepend binaries with prefix on make install
+set(PROGRAM_PREFIX "" CACHE STRING "Program prefix on make install")
+
# Supported language bindings
option(BUILD_BINDINGS_JAVA "Build Java bindings")
option(BUILD_BINDINGS_PYTHON "Build Python bindings")
General options;
-h, --help display this help and exit
--prefix=STR install directory
+ --program-prefix=STR prefix of binaries prepended on make install
--name=STR use custom build directory name (optionally: +path)
--best turn on dependencies known to give best performance
--gpl permit GPL dependencies, if available
build_dir=build
install_prefix=default
+program_prefix=""
#--------------------------------------------------------------------------#
esac
;;
+ --program-prefix) die "missing argument to $1 (try -h)" ;;
+ --program-prefix=*) program_prefix=${1##*=} ;;
+
--name) die "missing argument to $1 (try -h)" ;;
--name=*) build_dir=${1##*=} ;;
&& cmake_opts="$cmake_opts -DSYMFPU_DIR=$symfpu_dir"
[ "$install_prefix" != default ] \
&& cmake_opts="$cmake_opts -DCMAKE_INSTALL_PREFIX=$install_prefix"
+[ -n "$program_prefix" ] \
+ && cmake_opts="$cmake_opts -DPROGRAM_PREFIX=$program_prefix"
root_dir=$(pwd)
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.
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)