Skip to content

Commit

Permalink
Fix build of third-party targets
Browse files Browse the repository at this point in the history
Since pugixml is no longer an interface dependency, rename
pugixml_impl to pugixml and remove the old pugixml target. Don't
export the pugixml and yaml-cpp targets.
  • Loading branch information
KyleFromKitware committed May 27, 2020
1 parent 4a85b21 commit 2a61c0e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion source/adios2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ target_include_directories(adios2_core
$<BUILD_INTERFACE:${ADIOS2_SOURCE_DIR}/source>
$<BUILD_INTERFACE:${ADIOS2_BINARY_DIR}/source>
)
target_link_libraries(adios2_core PRIVATE adios2sys_interface adios2::thirdparty::pugixml_impl taustubs adios2::thirdparty::yaml-cpp)
target_link_libraries(adios2_core PRIVATE adios2sys_interface adios2::thirdparty::pugixml taustubs adios2::thirdparty::yaml-cpp)
target_link_libraries(adios2_core PUBLIC ${CMAKE_THREAD_LIBS_INIT})
target_compile_features(adios2_core PUBLIC "$<BUILD_INTERFACE:${ADIOS2_CXX11_FEATURES}>")

Expand Down
3 changes: 0 additions & 3 deletions thirdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,10 @@ endif()

if(ADIOS2_USE_EXTERNAL_PUGIXML)
find_package(pugixml 1.10 REQUIRED)
add_library(pugixml_impl INTERFACE)
target_link_libraries(pugixml_impl INTERFACE pugixml)
else()
add_subdirectory(pugixml)
endif()
adios2_add_thirdparty_target(pugixml pugixml)
adios2_add_thirdparty_target(pugixml_impl pugixml_impl)
if(ADIOS2_USE_EXTERNAL_NLOHMANN_JSON)
find_package(nlohmann_json REQUIRED)
adios2_add_thirdparty_target(nlohmann_json nlohmann_json::nlohmann_json)
Expand Down
7 changes: 2 additions & 5 deletions thirdparty/pugixml/pugixml/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
add_library(pugixml_impl INTERFACE)
target_sources(pugixml_impl INTERFACE
add_library(pugixml INTERFACE)
target_sources(pugixml INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/pugiconfig.hpp>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/pugixml.hpp>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/pugixml.cpp>
)
add_library(pugixml INTERFACE)
target_include_directories(pugixml INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
)
target_link_libraries(pugixml_impl INTERFACE pugixml)
install(TARGETS pugixml_impl pugixml EXPORT adios2Exports)
2 changes: 0 additions & 2 deletions thirdparty/yaml-cpp/yaml-cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,3 @@ target_sources(yaml-cpp INTERFACE
target_include_directories(yaml-cpp INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
)

install(TARGETS yaml-cpp EXPORT adios2Exports)

0 comments on commit 2a61c0e

Please sign in to comment.