Skip to content
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

CMake: Bringing back ArcusConfig.cmake generation #138

Closed
wants to merge 1 commit into from
Closed
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
15 changes: 15 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
project(arcus)
cmake_minimum_required(VERSION 3.20)

include(CMakePackageConfigHelpers)
include(cmake/StandardProjectSettings.cmake)

option(BUILD_PYTHON "Build Python bindings for this library" ON)
Expand Down Expand Up @@ -61,6 +63,19 @@ install(TARGETS Arcus
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)

install(
EXPORT Arcus-targets
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/Arcus
)
configure_package_config_file(
ArcusConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/ArcusConfig.cmake
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/Arcus
)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ArcusConfig.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/Arcus
)

# Create the Python bindings
if(BUILD_PYTHON)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
Expand Down