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 727970a commit 52e773b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ include(AwsSanitizers)
include(CheckCCompilerFlag)
include(AwsFindPackage)
include(AwsFeatureTests)
include(GNUInstallDirs)

file(GLOB AWS_CHECKSUMS_HEADERS
"include/aws/checksums/*.h"
Expand Down Expand Up @@ -122,7 +123,7 @@ aws_use_package(aws-c-common)
target_link_libraries(${PROJECT_NAME} PUBLIC ${DEP_AWS_LIBS})
aws_prepare_shared_lib_exports(${PROJECT_NAME})

install(FILES ${AWS_CHECKSUMS_HEADERS} DESTINATION "${INCLUDE_DIRECTORY}/aws/checksums" COMPONENT Development)
install(FILES ${AWS_CHECKSUMS_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/checksums" COMPONENT Development)

if (BUILD_SHARED_LIBS)
set (TARGET_DIR "shared")
Expand All @@ -131,7 +132,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 @@ -140,7 +141,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)

include(CTest)
Expand Down
2 changes: 1 addition & 1 deletion bin/benchmark/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ install(TARGETS ${PROFILE_PROJECT_NAME}
EXPORT ${PROFILE_PROJECT_NAME}-targets
COMPONENT Runtime
RUNTIME
DESTINATION ${RUNTIME_DIRECTORY}
DESTINATION ${CMAKE_INSTALL_BINDIR}
COMPONENT Runtime)

0 comments on commit 52e773b

Please sign in to comment.