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 d298e9f commit 98baaf9
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 @@ -21,6 +21,7 @@ include(AwsCheckHeaders)
include(AwsSharedLibSetup)
include(AwsSanitizers)
include(AwsFindPackage)
include(GNUInstallDirs)

file(GLOB AWS_CAL_HEADERS
"include/aws/cal/*.h"
Expand Down Expand Up @@ -141,7 +142,7 @@ configure_file("cmake/${PROJECT_NAME}-config.cmake"
@ONLY)

aws_check_headers(${PROJECT_NAME} ${AWS_CAL_HEADERS})
install(FILES ${AWS_CAL_HEADERS} DESTINATION "${INCLUDE_DIRECTORY}/aws/cal" COMPONENT Development)
install(FILES ${AWS_CAL_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/cal" COMPONENT Development)

if (BUILD_SHARED_LIBS)
set (TARGET_DIR "shared")
Expand All @@ -150,20 +151,20 @@ 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)

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)

list(APPEND EXPORT_MODULES
"cmake/modules/Findcrypto.cmake"
)

install(FILES ${EXPORT_MODULES}
DESTINATION "${LIBRARY_DIRECTORY}/cmake/${PROJECT_NAME}/modules"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/modules"
COMPONENT Development)

if (NOT CMAKE_CROSSCOMPILING AND NOT BYO_CRYPTO)
Expand Down

0 comments on commit 98baaf9

Please sign in to comment.