Skip to content

Fix CMake config install directory #61

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ if (APPLE)
endif()
endif()

set(Async++_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/Async++" CACHE STRING "Async++ CMake package install directory")

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

# Add all source and header files so IDEs can see them
Expand Down Expand Up @@ -130,11 +132,11 @@ endif()
include(CMakePackageConfigHelpers)
configure_package_config_file("${CMAKE_CURRENT_LIST_DIR}/Async++Config.cmake.in"
"${PROJECT_BINARY_DIR}/Async++Config.cmake"
INSTALL_DESTINATION cmake
INSTALL_DESTINATION "${Async++_INSTALL_CMAKEDIR}"
)

install(FILES "${PROJECT_BINARY_DIR}/Async++Config.cmake"
DESTINATION cmake
DESTINATION "${Async++_INSTALL_CMAKEDIR}"
)

# Install the library and produce a CMake export script
Expand All @@ -147,7 +149,7 @@ install(TARGETS Async++
FRAMEWORK DESTINATION Frameworks
)
export(EXPORT Async++)
install(EXPORT Async++ DESTINATION cmake)
install(EXPORT Async++ DESTINATION "${Async++_INSTALL_CMAKEDIR}")
if (APPLE AND BUILD_FRAMEWORK)
set_target_properties(Async++ PROPERTIES OUTPUT_NAME Async++ FRAMEWORK ON)
set_source_files_properties(${ASYNCXX_INCLUDE} PROPERTIES MACOSX_PACKAGE_LOCATION Headers/async++)
Expand Down