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

Enable targets exportation during build #150

Merged
merged 5 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ Ponca changelog
--------------------------------------------------------------------------------
Current head (v.1.4 RC)

- Cmake
- [build] Enable exportation of projects linking to Ponca targets (#150)
- [install] Change output directory to `lib/cmake/Ponca` (#150)

--------------------------------------------------------------------------------
v.1.3
This release introduces several improvements around the KdTre API, as well as bug fixes, new features and doc
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ endmacro()
################################################################################
set(Ponca_EXPORT_TARGET_DIR \${CMAKE_CURRENT_LIST_DIR})

set(config_install_dir "${CMAKE_INSTALL_PREFIX}/lib/cmake/")
set(config_install_dir "${CMAKE_INSTALL_PREFIX}/lib/cmake/Ponca")
set(include_install_dir "${CMAKE_INSTALL_PREFIX}/include")
set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated")

Expand Down
1 change: 1 addition & 0 deletions cmake/Config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ find_dependency(Eigen3 REQUIRED)

include("@Ponca_EXPORT_TARGET_DIR@/PoncaTargets-Fitting.cmake")
include("@Ponca_EXPORT_TARGET_DIR@/PoncaTargets-Common.cmake")
include("@Ponca_EXPORT_TARGET_DIR@/PoncaTargets-SpatialPartitioning.cmake")


# Compute paths
Expand Down
6 changes: 5 additions & 1 deletion cmake/PoncaConfigureCommon.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,14 @@ install(TARGETS Common
install(EXPORT CommonTargets
FILE PoncaTargets-Common.cmake
NAMESPACE Ponca::
DESTINATION lib/cmake
DESTINATION lib/cmake/Ponca
)

add_library(Ponca::Common ALIAS Common)
export(EXPORT CommonTargets
FILE ${CMAKE_CURRENT_BINARY_DIR}/PoncaTargets-Common.cmake
NAMESPACE Ponca::
)

#############################################
# HACK: have the files showing in the IDE, under the name 'ponca-src'
Expand Down
6 changes: 5 additions & 1 deletion cmake/PoncaConfigureFitting.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,15 @@ install(TARGETS Fitting
install(EXPORT FittingTargets
FILE PoncaTargets-Fitting.cmake
NAMESPACE Ponca::
DESTINATION lib/cmake
DESTINATION lib/cmake/Ponca
COMPONENT Common
)

add_library(Ponca::Fitting ALIAS Fitting)
export(EXPORT FittingTargets
FILE ${CMAKE_CURRENT_BINARY_DIR}/PoncaTargets-Fitting.cmake
NAMESPACE Ponca::
)

#############################################
# HACK: have the files showing in the IDE, under the name 'ponca-src'
Expand Down
6 changes: 5 additions & 1 deletion cmake/PoncaConfigureSpatialPartitioning.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,15 @@ install(TARGETS SpatialPartitioning
install(EXPORT SpatialPartitioningTargets
FILE PoncaTargets-SpatialPartitioning.cmake
NAMESPACE Ponca::
DESTINATION lib/cmake
DESTINATION lib/cmake/Ponca
COMPONENT Common
)

add_library(Ponca::SpatialPartitioning ALIAS SpatialPartitioning)
export(EXPORT SpatialPartitioningTargets
FILE ${CMAKE_CURRENT_BINARY_DIR}/PoncaTargets-SpatialPartitioning.cmake
NAMESPACE Ponca::
)

#############################################
# HACK: have the files showing in the IDE, under the name 'ponca-src'
Expand Down