Skip to content

Commit 57500b0

Browse files
committed
[Cpp] CMake: use variables for specifying install paths consistently
This allows overriding them if needed when the system uses different paths than usual (e.g. Haiku, which uses "develop/headers" for includes instead of "include"). Signed-off-by: Joachim Mairböck <[email protected]>
1 parent c2bfa34 commit 57500b0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

runtime/Cpp/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -222,14 +222,14 @@ endif(ANTLR4_INSTALL)
222222

223223
if(EXISTS LICENSE.txt)
224224
install(FILES LICENSE.txt
225-
DESTINATION "share/doc/libantlr4")
225+
DESTINATION ${CMAKE_INSTALL_DOCDIR})
226226
elseif(EXISTS ../../LICENSE.txt)
227227
install(FILES ../../LICENSE.txt
228-
DESTINATION "share/doc/libantlr4")
228+
DESTINATION ${CMAKE_INSTALL_DOCDIR})
229229
endif()
230230

231231
install(FILES README.md VERSION
232-
DESTINATION "share/doc/libantlr4")
232+
DESTINATION ${CMAKE_INSTALL_DOCDIR})
233233

234234
set(CPACK_PACKAGE_CONTACT "[email protected]")
235235
set(CPACK_PACKAGE_VERSION ${ANTLR_VERSION})

runtime/Cpp/runtime/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ install(TARGETS antlr4_static
148148
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
149149

150150
install(DIRECTORY "${PROJECT_SOURCE_DIR}/runtime/src/"
151-
DESTINATION "include/antlr4-runtime"
151+
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/antlr4-runtime"
152152
COMPONENT dev
153153
FILES_MATCHING PATTERN "*.h"
154154
)

0 commit comments

Comments
 (0)