Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdf9804d

Browse files
authored
CMake targets fixes for optional vs. required packages (#121)
1 parent1226726 commitdf9804d

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

‎CMakeLists.txt‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ if(ENABLE_USE_EIGEN)
171171
message(STATUS"Using Eigen3 & Spectra for CSymmetricMatrix::GetEigen.")
172172
find_package(Eigen3 REQUIRED)
173173
find_package(spectra REQUIRED)
174-
target_link_libraries(${PROJECT_NAME}PRIVATE Eigen3::Eigen Spectra::Spectra)
174+
target_link_libraries(${PROJECT_NAME}PUBLIC Eigen3::Eigen Spectra::Spectra)
175175
target_compile_definitions(${PROJECT_NAME}PRIVATE UVATLAS_USE_EIGEN)
176176
endif()
177177

@@ -254,7 +254,7 @@ if(BUILD_TOOLS AND WIN32)
254254
UVAtlasTool/Mesh.h
255255
UVAtlasTool/MeshOBJ.cpp
256256
UVAtlasTool/SDKMesh.h)
257-
target_link_libraries(uvatlastool
257+
target_link_libraries(uvatlastoolPRIVATE
258258
${PROJECT_NAME}
259259
ole32.libversion.lib
260260
Microsoft::DirectXMesh
@@ -263,11 +263,11 @@ if(BUILD_TOOLS AND WIN32)
263263
source_group(uvatlastoolREGULAR_EXPRESSION UVAtlasTool/*.*)
264264

265265
if(UVATLAS_USE_OPENMP)
266-
target_link_libraries(uvatlastool OpenMP::OpenMP_CXX)
266+
target_link_libraries(uvatlastoolPRIVATEOpenMP::OpenMP_CXX)
267267
endif()
268268

269269
if(directxmath_FOUND)
270-
target_link_libraries(uvatlastool Microsoft::DirectXMath)
270+
target_link_libraries(uvatlastoolPRIVATEMicrosoft::DirectXMath)
271271
endif()
272272
endif()
273273

‎build/UVAtlas-config.cmake.in‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@ if (ENABLE_USE_EIGEN)
1515
endif()
1616

1717
if(MINGWOR (NOTWIN32))
18-
find_dependency(directx-headers CONFIG)
19-
find_dependency(directxmath CONFIG)
18+
find_dependency(directx-headers)
19+
find_dependency(directxmath)
20+
else()
21+
find_package(directx-headers CONFIGQUIET)
22+
find_package(directxmath CONFIGQUIET)
2023
endif()
2124

2225
check_required_components("@PROJECT_NAME@")

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp