Skip to content

Commit

Permalink
Added GNUInstallDirs CMake module (#998)
Browse files Browse the repository at this point in the history
Replaces hardcoded installation paths with paths from GNUInstallDirs. This should help ensure cross-distribution builds, at least at the directory compatibility level.
  • Loading branch information
lRespublica authored May 17, 2024
1 parent da64cfc commit 4afc18c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ include(CMakePrintHelpers)
include(CheckCXXCompilerFlag)
include(AddFileDependencies)
include(FetchContent)
include(GNUInstallDirs)

# Global includes must be before all other includes/add_subdirectories
include(cmake/utils.cmake)
Expand Down
2 changes: 1 addition & 1 deletion common/tl/tl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ include(${COMMON_DIR}/tl2php/tl2php.cmake)

install(TARGETS tl-compiler tl2php
COMPONENT TL_TOOLS
RUNTIME DESTINATION bin)
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})

install(DIRECTORY ${COMMON_DIR}/tl-files
COMPONENT TL_TOOLS
Expand Down
6 changes: 3 additions & 3 deletions common/tlo-parsing/tlo-parsing.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ set_target_properties(tlo_parsing_static PROPERTIES

install(TARGETS tlo_parsing_static
COMPONENT TLO_PARSING_DEV
ARCHIVE DESTINATION lib
PUBLIC_HEADER DESTINATION usr/include/tlo-parsing)
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION /usr/${CMAKE_INSTALL_INCLUDEDIR}/tlo-parsing)

vk_add_library(tlo_parsing_shared SHARED $<TARGET_OBJECTS:tlo_parsing_src>)
set_target_properties(tlo_parsing_shared PROPERTIES OUTPUT_NAME tlo_parsing)
Expand All @@ -37,7 +37,7 @@ endif()

install(TARGETS tlo_parsing_shared
COMPONENT TLO_PARSING
LIBRARY DESTINATION lib)
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})

set(CPACK_DEBIAN_TLO_PARSING_PACKAGE_NAME "libtlo-parsing")
set(CPACK_DEBIAN_TLO_PARSING_DESCRIPTION "Library files for the tlo parsing")
Expand Down
4 changes: 2 additions & 2 deletions flex/flex.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ set_target_properties(flex_data_shared flex_data_static

install(TARGETS flex_data_shared flex_data_static
COMPONENT FLEX
LIBRARY DESTINATION usr/lib
ARCHIVE DESTINATION usr/lib)
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})

set(CPACK_DEBIAN_FLEX_PACKAGE_BREAKS "engine-kphp-runtime (<< 20190917), php5-vkext (<< 20190917), php7-vkext (<< 20190917)")
set(CPACK_DEBIAN_FLEX_PACKAGE_NAME "vk-flex-data")
Expand Down

0 comments on commit 4afc18c

Please sign in to comment.