@@ -179,22 +179,22 @@ install(FILES
179179 DESTINATION cmake/)
180180
181181#--- Command-line tools
182- if (BUILD_TOOLS AND WIN32 )
182+ if (BUILD_TOOLS AND WIN32 AND ( NOT WINDOWS_STORE) )
183183 add_executable (texassemble
184184 Texassemble/texassemble.cpp
185185 Texassemble/AnimatedGif.cpp)
186- target_link_libraries (texassemble ${PROJECT_NAME} version .lib)
186+ target_link_libraries (texassemble ${PROJECT_NAME} ole32.lib version .lib)
187187 source_group (texassemble REGULAR_EXPRESSION Texassemble/*.*)
188188
189189 add_executable (texconv
190190 Texconv/texconv.cpp
191191 Texconv/ExtendedBMP.cpp
192192 Texconv/PortablePixMap.cpp)
193- target_link_libraries (texconv ${PROJECT_NAME} version .lib)
193+ target_link_libraries (texconv ${PROJECT_NAME} ole32.lib shell32.lib version .lib)
194194 source_group (texconv REGULAR_EXPRESSION Texconv/*.*)
195195
196196 add_executable (texdiag Texdiag/texdiag.cpp)
197- target_link_libraries (texdiag ${PROJECT_NAME} version .lib)
197+ target_link_libraries (texdiag ${PROJECT_NAME} ole32.lib version .lib)
198198 source_group (texdiag REGULAR_EXPRESSION Texdiag/*.*)
199199
200200 if (ENABLE_OPENEXR_SUPPORT)
@@ -210,15 +210,15 @@ endif()
210210
211211if (MSVC )
212212 target_compile_options (${PROJECT_NAME} PRIVATE /fp:fast)
213- if (BUILD_TOOLS AND WIN32 )
213+ if (BUILD_TOOLS AND WIN32 AND ( NOT WINDOWS_STORE) )
214214 target_compile_options (texassemble PRIVATE /fp:fast)
215215 target_compile_options (texconv PRIVATE /fp:fast)
216216 target_compile_options (texdiag PRIVATE /fp:fast)
217217 endif ()
218218
219- if (${CMAKE_SIZEOF_VOID_P} EQUAL "4" )
219+ if (( ${CMAKE_SIZEOF_VOID_P} EQUAL "4" ) AND ( NOT ${CMAKE_VS_PLATFORM_NAME} MATCHES "arm" ) )
220220 target_compile_options (${PROJECT_NAME} PRIVATE /arch:SSE2)
221- if (BUILD_TOOLS AND WIN32 )
221+ if (BUILD_TOOLS AND WIN32 AND ( NOT WINDOWS_STORE) )
222222 target_compile_options (texassemble PRIVATE /arch:SSE2)
223223 target_compile_options (texconv PRIVATE /arch:SSE2)
224224 target_compile_options (texdiag PRIVATE /arch:SSE2)
@@ -232,7 +232,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
232232
233233 # OpenMP is not supported for clang for Windows by default
234234
235- if (BUILD_TOOLS AND WIN32 )
235+ if (BUILD_TOOLS AND WIN32 AND ( NOT WINDOWS_STORE) )
236236 set (WarningsEXE ${WarningsLib} "-Wno-c++98-compat" "-Wno-c++98-compat-pedantic" "-Wno-switch" "-Wno-switch-enum" "-Wno-language-extension-token" "-Wno-missing-prototypes" )
237237 target_compile_options (texassemble PRIVATE ${WarningsEXE} )
238238 target_compile_options (texconv PRIVATE ${WarningsEXE} "-Wno-global-constructors" )
@@ -241,15 +241,15 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
241241endif ()
242242if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC" )
243243 target_compile_options (${PROJECT_NAME} PRIVATE /permissive- /JMC- /Zc:__cplusplus)
244- if (BUILD_TOOLS AND WIN32 )
244+ if (BUILD_TOOLS AND WIN32 AND ( NOT WINDOWS_STORE) )
245245 target_compile_options (texassemble PRIVATE /permissive- /Zc:__cplusplus)
246246 target_compile_options (texconv PRIVATE /permissive- /Zc:__cplusplus)
247247 target_compile_options (texdiag PRIVATE /permissive- /Zc:__cplusplus)
248248 endif ()
249249
250250 if (ENABLE_CODE_ANALYSIS)
251251 target_compile_options (${PROJECT_NAME} PRIVATE /analyze)
252- if (BUILD_TOOLS AND WIN32 )
252+ if (BUILD_TOOLS AND WIN32 AND ( NOT WINDOWS_STORE) )
253253 target_compile_options (texassemble PRIVATE /analyze)
254254 target_compile_options (texconv PRIVATE /analyze)
255255 target_compile_options (texdiag PRIVATE /analyze)
@@ -258,7 +258,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
258258
259259 if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.26)
260260 target_compile_options (${PROJECT_NAME} PRIVATE /Zc:preprocessor /wd5105)
261- if (BUILD_TOOLS AND WIN32 )
261+ if (BUILD_TOOLS AND WIN32 AND ( NOT WINDOWS_STORE) )
262262 target_compile_options (texassemble PRIVATE /Zc:preprocessor /wd5105)
263263 target_compile_options (texconv PRIVATE /Zc:preprocessor /wd5105)
264264 target_compile_options (texdiag PRIVATE /Zc:preprocessor /wd5105)
@@ -267,13 +267,13 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
267267
268268 if (BC_USE_OPENMP)
269269 target_compile_options (${PROJECT_NAME} PRIVATE /openmp /Zc:twoPhase-)
270- if (BUILD_TOOLS AND WIN32 )
270+ if (BUILD_TOOLS AND WIN32 AND ( NOT WINDOWS_STORE) )
271271 target_compile_options (texconv PRIVATE /openmp /Zc:twoPhase-)
272272 endif ()
273273 endif ()
274274
275- if (BUILD_TOOLS AND WIN32 )
276- set (WarningsEXE "/wd4061" "/wd4062" "/wd4365" "/wd4668" "/wd4710" "/wd4820" "/wd5039" "/wd5045" "/wd5219" )
275+ if (BUILD_TOOLS AND WIN32 AND ( NOT WINDOWS_STORE) )
276+ set (WarningsEXE "/wd4061" "/wd4062" "/wd4365" "/wd4514" "/wd4625" "/wd4626" "/wd4627" "/ wd4668" "/wd4710" "/wd4751" "/ wd4820" "/wd5026" "/wd5027 " "/wd5039" "/wd5045" "/wd5219" )
277277 target_compile_options (texassemble PRIVATE ${WarningsEXE} )
278278 target_compile_options (texconv PRIVATE ${WarningsEXE} )
279279 target_compile_options (texdiag PRIVATE ${WarningsEXE} )
@@ -282,7 +282,7 @@ endif()
282282
283283if (WIN32 )
284284 target_compile_definitions (${PROJECT_NAME} PRIVATE _UNICODE UNICODE)
285- if (BUILD_TOOLS)
285+ if (BUILD_TOOLS AND ( NOT WINDOWS_STORE) )
286286 target_compile_definitions (texassemble PRIVATE _UNICODE UNICODE _WIN32_WINNT=0x0601)
287287 target_compile_definitions (texconv PRIVATE _UNICODE UNICODE _WIN32_WINNT=0x0601)
288288 target_compile_definitions (texdiag PRIVATE _UNICODE UNICODE _WIN32_WINNT=0x0601)
@@ -295,6 +295,6 @@ if(WIN32)
295295 endif ()
296296endif ()
297297
298- if (BUILD_TOOLS AND WIN32 )
298+ if (BUILD_TOOLS AND WIN32 AND ( NOT WINDOWS_STORE) )
299299 set_property (DIRECTORY PROPERTY VS_STARTUP_PROJECT texconv)
300300endif ()
0 commit comments