Skip to content

Commit

Permalink
Clean CMake boost export.
Browse files Browse the repository at this point in the history
  • Loading branch information
BDoignies committed Mar 6, 2025
1 parent 83d2d16 commit 89d6621
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 122 deletions.
82 changes: 0 additions & 82 deletions cmake/Install.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,47 +8,6 @@ install(TARGETS
DGtal
# Dependancies also built by the project
DGtal_STB DGTAL_LibBoard DGTAL_BoostAddons
# Other dependencies
boost_headers
boost_throw_exception
boost_assert
boost_config
boost_iostreams
boost_core
boost_detail
boost_function
boost_static_assert
boost_integer
boost_iterator
boost_mpl
boost_preprocessor
boost_random
boost_range
boost_regex
boost_smart_ptr
boost_utility
boost_numeric_conversion
boost_type_traits
boost_bind
boost_concept_check
boost_function_types
boost_fusion
boost_optional
boost_predef
boost_array
boost_dynamic_bitset
boost_io
boost_system
boost_container_hash
boost_conversion
boost_tuple
boost_typeof
boost_move
boost_functional
boost_mp11
boost_variant2
boost_winapi
boost_describe
EXPORT DGtalTargets
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
Expand All @@ -62,47 +21,6 @@ export(TARGETS
DGtal
# Dependancies also built by the project
DGtal_STB DGTAL_LibBoard DGTAL_BoostAddons
# Other dependencies
boost_headers
boost_throw_exception
boost_assert
boost_config
boost_iostreams
boost_core
boost_detail
boost_function
boost_static_assert
boost_integer
boost_iterator
boost_mpl
boost_preprocessor
boost_random
boost_range
boost_regex
boost_smart_ptr
boost_utility
boost_numeric_conversion
boost_type_traits
boost_bind
boost_concept_check
boost_function_types
boost_fusion
boost_optional
boost_predef
boost_array
boost_dynamic_bitset
boost_io
boost_system
boost_container_hash
boost_conversion
boost_tuple
boost_typeof
boost_move
boost_functional
boost_mp11
boost_variant2
boost_winapi
boost_describe
NAMESPACE DGtal::
FILE DGtalTargets.cmake
)
Expand Down
12 changes: 12 additions & 0 deletions cmake/deps/boost.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,15 @@ if(NOT TARGET Boost::boost)
add_library(Boost::boost ALIAS Boost::headers)
endif()
endif()

# Install boost files when installing library
install(DIRECTORY ${BOOST_INCLUDE_DIRS}/Boost DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/DGtal/3rdParties/)
install(TARGETS boost_headers EXPORT boost_headers)
install(EXPORT boost_headers DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/boost NAMESPACE Boost::)

# Export target Boost::headers
export(TARGETS
boost_headers
NAMESPACE Boost::
FILE BoostTargets.cmake
)
41 changes: 1 addition & 40 deletions src/BoostAddons/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,5 @@ set(BOOSTADDONS_SRC
zlib.cpp)

add_library(DGTAL_BoostAddons STATIC ${BOOSTADDONS_SRC})
target_link_libraries(DGTAL_BoostAddons PRIVATE Boost::boost boost_headers
boost_throw_exception
boost_assert
boost_config
boost_iostreams
boost_core
boost_detail
boost_function
boost_static_assert
boost_integer
boost_iterator
boost_mpl
boost_preprocessor
boost_random
boost_range
boost_regex
boost_smart_ptr
boost_utility
boost_numeric_conversion
boost_type_traits
boost_bind
boost_concept_check
boost_function_types
boost_fusion
boost_optional
boost_predef
boost_array
boost_dynamic_bitset
boost_io
boost_system
boost_container_hash
boost_conversion
boost_tuple
boost_typeof
boost_move
boost_functional
boost_mp11
boost_variant2
boost_winapi
boost_describe)
target_link_libraries(DGTAL_BoostAddons PRIVATE Boost::boost)
set_property(TARGET DGTAL_BoostAddons PROPERTY POSITION_INDEPENDENT_CODE ON)

0 comments on commit 89d6621

Please sign in to comment.