@@ -179,22 +179,22 @@ install(FILES
179
179
DESTINATION cmake/)
180
180
181
181
#--- Command-line tools
182
- if (BUILD_TOOLS AND WIN32 )
182
+ if (BUILD_TOOLS AND WIN32 AND ( NOT WINDOWS_STORE) )
183
183
add_executable (texassemble
184
184
Texassemble/texassemble.cpp
185
185
Texassemble/AnimatedGif.cpp)
186
- target_link_libraries (texassemble ${PROJECT_NAME} version .lib)
186
+ target_link_libraries (texassemble ${PROJECT_NAME} ole32.lib version .lib)
187
187
source_group (texassemble REGULAR_EXPRESSION Texassemble/*.*)
188
188
189
189
add_executable (texconv
190
190
Texconv/texconv.cpp
191
191
Texconv/ExtendedBMP.cpp
192
192
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)
194
194
source_group (texconv REGULAR_EXPRESSION Texconv/*.*)
195
195
196
196
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)
198
198
source_group (texdiag REGULAR_EXPRESSION Texdiag/*.*)
199
199
200
200
if (ENABLE_OPENEXR_SUPPORT)
@@ -210,15 +210,15 @@ endif()
210
210
211
211
if (MSVC )
212
212
target_compile_options (${PROJECT_NAME} PRIVATE /fp:fast)
213
- if (BUILD_TOOLS AND WIN32 )
213
+ if (BUILD_TOOLS AND WIN32 AND ( NOT WINDOWS_STORE) )
214
214
target_compile_options (texassemble PRIVATE /fp:fast)
215
215
target_compile_options (texconv PRIVATE /fp:fast)
216
216
target_compile_options (texdiag PRIVATE /fp:fast)
217
217
endif ()
218
218
219
- if (${CMAKE_SIZEOF_VOID_P} EQUAL "4" )
219
+ if (( ${CMAKE_SIZEOF_VOID_P} EQUAL "4" ) AND ( NOT ${CMAKE_VS_PLATFORM_NAME} MATCHES "arm" ) )
220
220
target_compile_options (${PROJECT_NAME} PRIVATE /arch:SSE2)
221
- if (BUILD_TOOLS AND WIN32 )
221
+ if (BUILD_TOOLS AND WIN32 AND ( NOT WINDOWS_STORE) )
222
222
target_compile_options (texassemble PRIVATE /arch:SSE2)
223
223
target_compile_options (texconv PRIVATE /arch:SSE2)
224
224
target_compile_options (texdiag PRIVATE /arch:SSE2)
@@ -232,7 +232,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
232
232
233
233
# OpenMP is not supported for clang for Windows by default
234
234
235
- if (BUILD_TOOLS AND WIN32 )
235
+ if (BUILD_TOOLS AND WIN32 AND ( NOT WINDOWS_STORE) )
236
236
set (WarningsEXE ${WarningsLib} "-Wno-c++98-compat" "-Wno-c++98-compat-pedantic" "-Wno-switch" "-Wno-switch-enum" "-Wno-language-extension-token" "-Wno-missing-prototypes" )
237
237
target_compile_options (texassemble PRIVATE ${WarningsEXE} )
238
238
target_compile_options (texconv PRIVATE ${WarningsEXE} "-Wno-global-constructors" )
@@ -241,15 +241,15 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
241
241
endif ()
242
242
if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC" )
243
243
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) )
245
245
target_compile_options (texassemble PRIVATE /permissive- /Zc:__cplusplus)
246
246
target_compile_options (texconv PRIVATE /permissive- /Zc:__cplusplus)
247
247
target_compile_options (texdiag PRIVATE /permissive- /Zc:__cplusplus)
248
248
endif ()
249
249
250
250
if (ENABLE_CODE_ANALYSIS)
251
251
target_compile_options (${PROJECT_NAME} PRIVATE /analyze)
252
- if (BUILD_TOOLS AND WIN32 )
252
+ if (BUILD_TOOLS AND WIN32 AND ( NOT WINDOWS_STORE) )
253
253
target_compile_options (texassemble PRIVATE /analyze)
254
254
target_compile_options (texconv PRIVATE /analyze)
255
255
target_compile_options (texdiag PRIVATE /analyze)
@@ -258,7 +258,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
258
258
259
259
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.26)
260
260
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) )
262
262
target_compile_options (texassemble PRIVATE /Zc:preprocessor /wd5105)
263
263
target_compile_options (texconv PRIVATE /Zc:preprocessor /wd5105)
264
264
target_compile_options (texdiag PRIVATE /Zc:preprocessor /wd5105)
@@ -267,13 +267,13 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
267
267
268
268
if (BC_USE_OPENMP)
269
269
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) )
271
271
target_compile_options (texconv PRIVATE /openmp /Zc:twoPhase-)
272
272
endif ()
273
273
endif ()
274
274
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" )
277
277
target_compile_options (texassemble PRIVATE ${WarningsEXE} )
278
278
target_compile_options (texconv PRIVATE ${WarningsEXE} )
279
279
target_compile_options (texdiag PRIVATE ${WarningsEXE} )
@@ -282,7 +282,7 @@ endif()
282
282
283
283
if (WIN32 )
284
284
target_compile_definitions (${PROJECT_NAME} PRIVATE _UNICODE UNICODE)
285
- if (BUILD_TOOLS)
285
+ if (BUILD_TOOLS AND ( NOT WINDOWS_STORE) )
286
286
target_compile_definitions (texassemble PRIVATE _UNICODE UNICODE _WIN32_WINNT=0x0601)
287
287
target_compile_definitions (texconv PRIVATE _UNICODE UNICODE _WIN32_WINNT=0x0601)
288
288
target_compile_definitions (texdiag PRIVATE _UNICODE UNICODE _WIN32_WINNT=0x0601)
@@ -295,6 +295,6 @@ if(WIN32)
295
295
endif ()
296
296
endif ()
297
297
298
- if (BUILD_TOOLS AND WIN32 )
298
+ if (BUILD_TOOLS AND WIN32 AND ( NOT WINDOWS_STORE) )
299
299
set_property (DIRECTORY PROPERTY VS_STARTUP_PROJECT texconv)
300
300
endif ()
0 commit comments