-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into cleanup_issues_in_sensei_config
- Loading branch information
Showing
3 changed files
with
25 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
find_package(pugixml REQUIRED COMPONENTS pugixml) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,28 @@ | ||
sensei_add_library(pugixml STATIC src/pugixml.cpp) | ||
if (SENSEI_USE_EXTERNAL_pugixml) | ||
find_package(pugixml REQUIRED COMPONENTS pugixml) | ||
|
||
target_include_directories(pugixml | ||
INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src> | ||
$<INSTALL_INTERFACE:include/pugixml>) | ||
|
||
set_property(TARGET pugixml PROPERTY POSITION_INDEPENDENT_CODE ON) | ||
configure_file("${CMAKE_SOURCE_DIR}/CMake/external.pugixml.cmake.in" | ||
"${CMAKE_BINARY_DIR}/lib/cmake/pugixml.cmake" | ||
@ONLY) | ||
|
||
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/src/" | ||
DESTINATION include/pugixml FILES_MATCHING PATTERN "*.hpp") | ||
install( | ||
FILES "${CMAKE_BINARY_DIR}/lib/cmake/pugixml.cmake" | ||
DESTINATION "lib/cmake") | ||
else () | ||
sensei_add_library(pugixml STATIC src/pugixml.cpp) | ||
|
||
install(TARGETS pugixml EXPORT pugixml | ||
INCLUDES DESTINATION include/pugixml ARCHIVE DESTINATION lib | ||
LIBRARY DESTINATION lib) | ||
target_include_directories(pugixml | ||
INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src> | ||
$<INSTALL_INTERFACE:include/pugixml>) | ||
|
||
install(EXPORT pugixml DESTINATION lib/cmake | ||
EXPORT_LINK_INTERFACE_LIBRARIES) | ||
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/src/" | ||
DESTINATION include/pugixml FILES_MATCHING PATTERN "*.hpp") | ||
|
||
install(TARGETS pugixml EXPORT pugixml | ||
INCLUDES DESTINATION include/pugixml ARCHIVE DESTINATION lib | ||
LIBRARY DESTINATION lib) | ||
|
||
install(EXPORT pugixml DESTINATION lib/cmake | ||
EXPORT_LINK_INTERFACE_LIBRARIES) | ||
endif () |