diff options
author | Rolf Eike Beer <eb@emlix.com> | 2022-09-22 09:12:26 +0200 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2022-11-23 08:44:48 -0500 |
commit | aa8cb9d6d304d68e7c800f700eb66b3eee96975d (patch) | |
tree | fdcacc238e34d1a8d6bb09009119963577c5550c /src | |
parent | 97e4a1b5538f5e574ac189e0b72ceb0eaa0f7b0f (diff) | |
download | lighttpd-git-aa8cb9d6d304d68e7c800f700eb66b3eee96975d.tar.gz |
[cmake] use GNUInstallDirs to set defaults for several directories
This will do the right thing for most distros, and if not they know how to
override it.
github: #121
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ef8f458f..bae0cd07 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -831,12 +831,8 @@ set(LIGHTTPD_VERSION_ID 0x104${PROJECT_VERSION_PATCH}) set(PACKAGE_NAME "${CMAKE_PROJECT_NAME}") set(PACKAGE_VERSION "${PROJECT_VERSION}") -if(NOT SBINDIR) - set(SBINDIR "sbin") -endif() - if(NOT LIGHTTPD_MODULES_DIR) - set(LIGHTTPD_MODULES_DIR "lib${LIB_SUFFIX}/lighttpd") + set(LIGHTTPD_MODULES_DIR "${CMAKE_INSTALL_FULL_LIBDIR}/lighttpd") endif() if(NOT WIN32) @@ -896,7 +892,7 @@ set(L_INSTALL_TARGETS) add_executable(lighttpd-angel lighttpd-angel.c) set(L_INSTALL_TARGETS ${L_INSTALL_TARGETS} lighttpd-angel) -add_target_properties(lighttpd-angel COMPILE_FLAGS "-DSBIN_DIR=\\\\\"${CMAKE_INSTALL_PREFIX}/${SBINDIR}\\\\\"") +add_target_properties(lighttpd-angel COMPILE_FLAGS "-DSBIN_DIR=\\\\\"${CMAKE_INSTALL_FULL_SBINDIR}\\\\\"") add_executable(lighttpd server.c @@ -1249,17 +1245,17 @@ endif() if(NOT WIN32) install(TARGETS ${L_INSTALL_TARGETS} - RUNTIME DESTINATION ${SBINDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR} LIBRARY DESTINATION ${LIGHTTPD_MODULES_DIR} ARCHIVE DESTINATION ${LIGHTTPD_MODULES_DIR}/static) else() ## HACK to make win32 to install our libraries in desired directory.. install(TARGETS lighttpd - RUNTIME DESTINATION ${SBINDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR} ARCHIVE DESTINATION lib/static) list(REMOVE_ITEM L_INSTALL_TARGETS lighttpd) install(TARGETS ${L_INSTALL_TARGETS} - RUNTIME DESTINATION ${SBINDIR}/lib + RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR}/lib LIBRARY DESTINATION lib ARCHIVE DESTINATION lib/static) endif() |