summaryrefslogtreecommitdiff
path: root/src/parser
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/parser
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/parser')
-rw-r--r--src/parser/CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parser/CMakeLists.txt b/src/parser/CMakeLists.txt
index 393b1597a..362fdab89 100644
--- a/src/parser/CMakeLists.txt
+++ b/src/parser/CMakeLists.txt
@@ -99,7 +99,7 @@ target_link_libraries(cvc4parser cvc4 ${ANTLR_LIBRARIES})
target_include_directories(cvc4parser PRIVATE ${ANTLR_INCLUDE_DIR})
install(TARGETS cvc4parser
EXPORT cvc4-targets
- DESTINATION ${LIBRARY_INSTALL_DIR})
+ DESTINATION ${CMAKE_INSTALL_LIBDIR})
# The generated lexer/parser files define some functions as
# __declspec(dllexport) via the ANTLR3_API macro, which leads to lots of
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback