mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-25 03:39:06 +08:00
91393faf12
* [ignition-common3] Fix usage for graph * version * Apply suggestion * version * Add option OPTIONS, add pkgconfig support, refactor function option declarations * Remove cmake find module installation, add pkgconfig support and fix PRIVATE_FOR limit * Apply suggestions, fix dependency libxml2 * version
82 lines
2.7 KiB
Diff
82 lines
2.7 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 73920fe..8bee7fe 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -52,7 +52,7 @@ set(IGN_MATH_VER ${ignition-math6_VERSION_MAJOR})
|
|
#--------------------------------------
|
|
# Find Tinyxml2
|
|
if(USE_EXTERNAL_TINYXML2)
|
|
- ign_find_package(TINYXML2 PRETTY tinyxml2
|
|
+ ign_find_package(tinyxml2 EXTRA_ARGS CONFIG
|
|
REQUIRED_BY graphics
|
|
PRIVATE_FOR graphics)
|
|
else()
|
|
@@ -70,13 +70,13 @@ if(NOT MSVC)
|
|
|
|
#------------------------------------
|
|
# Find uuid
|
|
- ign_find_package(UUID REQUIRED PRETTY uuid)
|
|
+ ign_find_package(UUID REQUIRED PRETTY uuid REQUIRED_BY graphics)
|
|
|
|
endif()
|
|
|
|
#------------------------------------
|
|
# Find Freeimage
|
|
-ign_find_package(FreeImage VERSION 3.9
|
|
+ign_find_package(freeimage EXTRA_ARGS CONFIG
|
|
REQUIRED_BY graphics
|
|
PRIVATE_FOR graphics)
|
|
|
|
@@ -84,6 +84,7 @@ ign_find_package(FreeImage VERSION 3.9
|
|
# Find GNU Triangulation Surface Library
|
|
ign_find_package(
|
|
GTS PRETTY gts PURPOSE "GNU Triangulation Surface library"
|
|
+ BY_PKGCONFIG gts
|
|
REQUIRED_BY graphics
|
|
PRIVATE_FOR graphics)
|
|
|
|
diff --git a/graphics/src/CMakeLists.txt b/graphics/src/CMakeLists.txt
|
|
index 000a0ce..f6e1831 100644
|
|
--- a/graphics/src/CMakeLists.txt
|
|
+++ b/graphics/src/CMakeLists.txt
|
|
@@ -16,8 +16,10 @@ target_link_libraries(${graphics_target}
|
|
PUBLIC
|
|
ignition-math${IGN_MATH_VER}::ignition-math${IGN_MATH_VER}
|
|
PRIVATE
|
|
- GTS::GTS
|
|
- FreeImage::FreeImage)
|
|
+ ${GTS_LINK_LIBRARIES}
|
|
+ freeimage::FreeImage)
|
|
+
|
|
+target_include_directories(${graphics_target} PRIVATE ${GTS_INCLUDE_DIRS})
|
|
|
|
ign_build_tests(TYPE UNIT SOURCES ${gtest_sources}
|
|
LIB_DEPS ${graphics_target})
|
|
@@ -28,13 +30,13 @@ if(USE_EXTERNAL_TINYXML2)
|
|
# If we are using an external copy of tinyxml2, add its imported target
|
|
target_link_libraries(${graphics_target}
|
|
PRIVATE
|
|
- TINYXML2::TINYXML2)
|
|
+ tinyxml2::tinyxml2)
|
|
|
|
# The collada exporter test uses tinyxml2, so we must link it if we're using
|
|
# an external copy. The graphics target considers tinyxml2 to be a private
|
|
# dependency, so it will not automatically get linked to this test.
|
|
if(TARGET UNIT_ColladaExporter_TEST)
|
|
- target_link_libraries(UNIT_ColladaExporter_TEST TINYXML2::TINYXML2)
|
|
+ target_link_libraries(UNIT_ColladaExporter_TEST tinyxml2::tinyxml2)
|
|
endif()
|
|
|
|
else()
|
|
@@ -62,8 +64,8 @@ endif()
|
|
|
|
# define of tinxml2 major version >= 6
|
|
# https://github.com/ignitionrobotics/ign-common/issues/28
|
|
-if (NOT TINYXML2_VERSION VERSION_LESS "6.0.0")
|
|
- message(STATUS "TINYXML2_VERSION ${TINYXML2_VERSION} >= 6.0.0")
|
|
+if (NOT tinyxml2_VERSION VERSION_LESS "6.0.0")
|
|
+ message(STATUS "TINYXML2_VERSION ${tinyxml2_VERSION} >= 6.0.0")
|
|
target_compile_definitions(${graphics_target}
|
|
PRIVATE "TINYXML2_MAJOR_VERSION_GE_6")
|
|
endif()
|