Skip to content

Commit

Permalink
Just use CMAKE_INSTALL_LIBDIR etc, instead of our own custom variables
Browse files Browse the repository at this point in the history
  • Loading branch information
graebm committed Dec 21, 2024
1 parent 42df65b commit fbd010c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ include(AwsSharedLibSetup)
include(AwsSanitizers)
include(AwsFindPackage)
include(CTest)
include(GNUInstallDirs)

option(BUILD_RELOCATABLE_BINARIES
"Build Relocatable Binaries, this will turn off features that will fail on older kernels than used for the build."
Expand Down Expand Up @@ -200,8 +201,8 @@ target_link_libraries(${PROJECT_NAME} PRIVATE ${PLATFORM_LIBS})

aws_prepare_shared_lib_exports(${PROJECT_NAME})

install(FILES ${AWS_IO_HEADERS} DESTINATION "${INCLUDE_DIRECTORY}/aws/io" COMPONENT Development)
install(FILES ${AWS_IO_TESTING_HEADERS} DESTINATION "${INCLUDE_DIRECTORY}/aws/testing" COMPONENT Development)
install(FILES ${AWS_IO_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/io" COMPONENT Development)
install(FILES ${AWS_IO_TESTING_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/testing" COMPONENT Development)

if (BUILD_SHARED_LIBS)
set (TARGET_DIR "shared")
Expand All @@ -210,7 +211,7 @@ else()
endif()

install(EXPORT "${PROJECT_NAME}-targets"
DESTINATION "${LIBRARY_DIRECTORY}/cmake/${PROJECT_NAME}/${TARGET_DIR}"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/${TARGET_DIR}"
NAMESPACE AWS::
COMPONENT Development)

Expand All @@ -219,7 +220,7 @@ configure_file("cmake/${PROJECT_NAME}-config.cmake"
@ONLY)

install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake"
DESTINATION "${LIBRARY_DIRECTORY}/cmake/${PROJECT_NAME}/"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/"
COMPONENT Development)

if (NOT CMAKE_CROSSCOMPILING)
Expand Down

0 comments on commit fbd010c

Please sign in to comment.