@@ -39,7 +39,7 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/CMake")
3939set (CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR} /bin/CMake" )
4040set (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR} /bin/CMake" )
4141
42- if (DEFINED VCPKG_TARGET_ARCHITECTURE)
42+ if (DEFINED VCPKG_TARGET_ARCHITECTURE)
4343 set (DIRECTX_ARCH${VCPKG_TARGET_ARCHITECTURE} )
4444elseif (CMAKE_GENERATOR_PLATFORMMATCHES "^[Ww][Ii][Nn]32$" )
4545 set (DIRECTX_ARCH x86)
@@ -122,19 +122,19 @@ target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_11)
122122
123123target_include_directories (${PROJECT_NAME} PRIVATE UVAtlas UVAtlas/geodesics UVAtlas/isochart)
124124
125- if (NOT MINGW)
125+ if (NOT MINGW)
126126 target_precompile_headers(${PROJECT_NAME} PRIVATE UVAtlas/pch.h)
127127endif ()
128128
129- if (MINGWOR (NOT WIN32 )OR VCPKG_TOOLCHAIN)
129+ if (MINGWOR (NOT WIN32 )OR VCPKG_TOOLCHAIN)
130130 message ("INFO: Using VCPKG for DirectX-Headers and DirectXMath." )
131131 find_package (directx-headers CONFIG REQUIRED)
132132 find_package (directxmath CONFIG REQUIRED)
133133 target_link_libraries (${PROJECT_NAME} PRIVATE Microsoft::DirectX-Headers Microsoft::DirectXMath)
134134 target_compile_definitions (${PROJECT_NAME} PRIVATE USING_DIRECTX_HEADERS)
135135endif ()
136136
137- if (ENABLE_USE_EIGEN)
137+ if (ENABLE_USE_EIGEN)
138138 message ("INFO: Using Eigen3 & Spectra for CSymmetricMatrix::GetEigen." )
139139 find_package (Eigen3 REQUIRED)
140140 find_package (spectra REQUIRED)
@@ -198,7 +198,7 @@ if(BUILD_TOOLS AND WIN32 AND (NOT WINDOWS_STORE))
198198 Microsoft::DirectXMesh::Utilities)
199199 source_group (uvatlastoolREGULAR_EXPRESSION UVAtlasTool/*.*)
200200
201- if (MINGWOR VCPKG_TOOLCHAIN)
201+ if (MINGWOR VCPKG_TOOLCHAIN)
202202 target_link_libraries (uvatlastool Microsoft::DirectXMath)
203203 endif ()
204204endif ()
@@ -222,10 +222,14 @@ if(MSVC)
222222 target_link_options (${t} PRIVATE "$<$<NOT:$<CONFIG:DEBUG>>:/guard:ehcont>" )
223223 endforeach ()
224224 endif ()
225+ else ()
226+ foreach (t IN LISTS TOOL_EXES ITEMS${PROJECT_NAME} )
227+ target_compile_definitions (${t} PRIVATE $<IF:$<CONFIG:DEBUG>,_DEBUG,NDEBUG>)
228+ endforeach ()
225229endif ()
226230
227231if (NOT (${DIRECTX_ARCH} MATCHES "^arm" ))
228- if (${CMAKE_SIZEOF_VOID_P} EQUAL "4" )
232+ if (${CMAKE_SIZEOF_VOID_P} EQUAL "4" )
229233 set (ARCH_SSE2 $<$<CXX_COMPILER_ID:MSVC >:/arch:SSE2> $<$<NOT :$<CXX_COMPILER_ID:MSVC >>:-msse2>)
230234 else ()
231235 set (ARCH_SSE2 $<$<NOT :$<CXX_COMPILER_ID:MSVC >>:-msse2>)
@@ -236,7 +240,7 @@ if(NOT (${DIRECTX_ARCH} MATCHES "^arm"))
236240 endforeach ()
237241endif ()
238242
239- if (CMAKE_CXX_COMPILER_IDMATCHES "Clang" )
243+ if (CMAKE_CXX_COMPILER_IDMATCHES "Clang" )
240244 set (WarningsLib -Wall -Wpedantic -Wextra)
241245 target_compile_options (${PROJECT_NAME} PRIVATE ${WarningsLib} )
242246
@@ -246,11 +250,10 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
246250 endforeach ()
247251elseif (MINGW)
248252 foreach (t IN LISTS TOOL_EXES ITEMS${PROJECT_NAME} )
249- target_compile_definitions (${t} PRIVATE $<IF:$<CONFIG:DEBUG>,_DEBUG,NDEBUG>)
250253 target_compile_options (${t} PRIVATE "-Wno-ignored-attributes" )
251254 target_link_options (${t} PRIVATE -municode)
252255 endforeach ()
253- elseif (CMAKE_CXX_COMPILER_IDMATCHES "MSVC" )
256+ elseif (CMAKE_CXX_COMPILER_IDMATCHES "MSVC" )
254257 foreach (t IN LISTS TOOL_EXES ITEMS${PROJECT_NAME} )
255258 target_compile_options (${t} PRIVATE /sdl /permissive- /JMC- /Zc:__cplusplus)
256259 endforeach ()
@@ -261,19 +264,19 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
261264 endforeach ()
262265 endif ()
263266
264- if (CMAKE_CXX_COMPILER_VERSIONVERSION_GREATER_EQUAL 19.24)
267+ if (CMAKE_CXX_COMPILER_VERSIONVERSION_GREATER_EQUAL 19.24)
265268 foreach (t IN LISTS TOOL_EXES ITEMS${PROJECT_NAME} )
266269 target_compile_options (${t} PRIVATE /ZH:SHA_256)
267270 endforeach ()
268271 endif ()
269272
270- if (CMAKE_CXX_COMPILER_VERSIONVERSION_GREATER_EQUAL 19.26)
273+ if (CMAKE_CXX_COMPILER_VERSIONVERSION_GREATER_EQUAL 19.26)
271274 foreach (t IN LISTS TOOL_EXES ITEMS${PROJECT_NAME} )
272275 target_compile_options (${t} PRIVATE /Zc:preprocessor /wd5105)
273276 endforeach ()
274277 endif ()
275278
276- if ((CMAKE_CXX_COMPILER_VERSIONVERSION_GREATER_EQUAL 19.27)AND (NOT (${DIRECTX_ARCH} MATCHES "^arm" )))
279+ if ((CMAKE_CXX_COMPILER_VERSIONVERSION_GREATER_EQUAL 19.27)AND (NOT (${DIRECTX_ARCH} MATCHES "^arm" )))
277280 foreach (t IN LISTS TOOL_EXES ITEMS${PROJECT_NAME} )
278281 target_link_options (${t} PRIVATE /CETCOMPAT)
279282 endforeach ()
@@ -286,7 +289,7 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
286289 endif ()
287290
288291 set (WarningsEXE"/wd4365" "/wd4514" "/wd4625" "/wd4626" "/wd4627" "/wd4668" "/wd4710" "/wd4751" "/wd4820" "/wd5026" "/wd5027" "/wd5039" "/wd5045" "/wd4061" "/wd4062" "/wd5219" )
289- if (CMAKE_CXX_COMPILER_VERSIONVERSION_GREATER_EQUAL 19.34)
292+ if (CMAKE_CXX_COMPILER_VERSIONVERSION_GREATER_EQUAL 19.34)
290293 list (APPEND WarningsEXE"/wd5262" "/wd5264" )
291294 target_compile_options (${PROJECT_NAME} PRIVATE "/wd5262" )
292295 endif ()