summaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorFabianWolff <fabi.wolff@arcor.de>2020-09-03 03:48:36 +0200
committerGitHub <noreply@github.com>2020-09-02 18:48:36 -0700
commitedd69cb2570692f36bf26b658e967c317ebc048e (patch)
tree0ec9063e7008788ce684b93c02252490cb90688f /src/main
parent8b4444dad1647c89b313deedd22129252078fe1b (diff)
Drop {INCLUDE,LIBRARY,RUNTIME}_INSTALL_DIR variables in CMakeLists.txt (#4979)
On Debian (for instance), libraries aren't installed into `/usr/lib/`, but into something like `/usr/lib/x86_64-linux-gnu/`. In particular, this means that setting the `LIBRARY_INSTALL_DIR` to `lib` in the top-level `CMakeLists.txt` file is wrong. Luckily, there is a simple solution: CMake provides [`CMAKE_INSTALL_LIBDIR`](https://cmake.org/cmake/help/v3.0/module/GNUInstallDirs.html) for this very purpose, which has sensible defaults and can be set by the user. In particular, since `CMAKE_INSTALL_LIBDIR` is a standardized variable, tools like the ones used for building Debian packages can set it to what they want it to be, whereas using a custom variable like `LIBRARY_INSTALL_DIR` wouldn't work in this setting. Signed-off-by: Fabian Wolff <fabi.wolff@arcor.de>
Diffstat (limited to 'src/main')
-rw-r--r--src/main/CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/CMakeLists.txt b/src/main/CMakeLists.txt
index ae0f8015b..8c11acf3b 100644
--- a/src/main/CMakeLists.txt
+++ b/src/main/CMakeLists.txt
@@ -51,11 +51,11 @@ target_link_libraries(cvc4-bin cvc4 cvc4parser)
if(PROGRAM_PREFIX)
install(PROGRAMS
$<TARGET_FILE:cvc4-bin>
- DESTINATION ${RUNTIME_INSTALL_DIR}
+ DESTINATION ${CMAKE_INSTALL_BINDIR}
RENAME ${PROGRAM_PREFIX}cvc4)
else()
install(TARGETS cvc4-bin
- DESTINATION ${RUNTIME_INSTALL_DIR})
+ DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()
# In order to get a fully static executable we have to make sure that we also
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback