diff --git a/CMakeLists.txt b/CMakeLists.txt index 48f0f18..c1a0617 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -122,7 +122,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/aws/checksums" COMPONENT Development) +install(FILES ${AWS_CHECKSUMS_HEADERS} DESTINATION "${INCLUDE_DIRECTORY}/aws/checksums" COMPONENT Development) if (BUILD_SHARED_LIBS) set (TARGET_DIR "shared") diff --git a/bin/benchmark/CMakeLists.txt b/bin/benchmark/CMakeLists.txt index 9f8f791..3a46df9 100644 --- a/bin/benchmark/CMakeLists.txt +++ b/bin/benchmark/CMakeLists.txt @@ -1,7 +1,5 @@ project(checksum-profile C) -list(APPEND CMAKE_MODULE_PATH "${CMAKE_INSTALL_PREFIX}/lib/cmake") - file(GLOB PROFILE_SRC "*.c" ) @@ -25,5 +23,5 @@ install(TARGETS ${PROFILE_PROJECT_NAME} EXPORT ${PROFILE_PROJECT_NAME}-targets COMPONENT Runtime RUNTIME - DESTINATION bin + DESTINATION ${RUNTIME_DIRECTORY} COMPONENT Runtime) diff --git a/cmake/AwsSharedLibSetup.cmake b/cmake/AwsSharedLibSetup.cmake deleted file mode 100644 index e8e6940..0000000 --- a/cmake/AwsSharedLibSetup.cmake +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -# SPDX-License-Identifier: Apache-2.0. - -set(LIBRARY_DIRECTORY lib) -set(RUNTIME_DIRECTORY bin) -# Set the default lib installation path on GNU systems with GNUInstallDirs -if (UNIX AND NOT APPLE) - include(GNUInstallDirs) - set(LIBRARY_DIRECTORY ${CMAKE_INSTALL_LIBDIR}) - set(RUNTIME_DIRECTORY ${CMAKE_INSTALL_BINDIR}) - - # this is the absolute dumbest thing in the world, but find_package won't work without it - # also I verified this is correctly NOT "lib64" when CMAKE_C_FLAGS includes "-m32" - if (${LIBRARY_DIRECTORY} STREQUAL "lib64") - set(FIND_LIBRARY_USE_LIB64_PATHS true) - endif() -endif() - - -function(aws_prepare_shared_lib_exports target) - if (BUILD_SHARED_LIBS) - install(TARGETS ${target} - EXPORT ${target}-targets - ARCHIVE - DESTINATION ${LIBRARY_DIRECTORY} - COMPONENT Development - LIBRARY - DESTINATION ${LIBRARY_DIRECTORY} - NAMELINK_SKIP - COMPONENT Runtime - RUNTIME - DESTINATION ${RUNTIME_DIRECTORY} - COMPONENT Runtime) - install(TARGETS ${target} - EXPORT ${target}-targets - LIBRARY - DESTINATION ${LIBRARY_DIRECTORY} - NAMELINK_ONLY - COMPONENT Development) - else() - install(TARGETS ${target} - EXPORT ${target}-targets - ARCHIVE DESTINATION ${LIBRARY_DIRECTORY} - COMPONENT Development) - endif() -endfunction() - -function(aws_prepare_symbol_visibility_args target lib_prefix) - if (BUILD_SHARED_LIBS) - target_compile_definitions(${target} PUBLIC "-D${lib_prefix}_USE_IMPORT_EXPORT") - target_compile_definitions(${target} PRIVATE "-D${lib_prefix}_EXPORTS") - endif() -endfunction()