File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -110,6 +110,10 @@ function(add_our_library target framework_name sources extra_flags link_with)
110
110
endif ()
111
111
endif ()
112
112
113
+ if (WIN32 )
114
+ set (extra_flags "${extra_flags} -DUNICODE -D_UNICODE" )
115
+ endif ()
116
+
113
117
if (NOT BUILD_SHARED_LIBS )
114
118
set (static_flag "-DALLEGRO_STATICLINK" )
115
119
endif (NOT BUILD_SHARED_LIBS )
@@ -304,19 +308,26 @@ function(add_our_executable nm)
304
308
set_property (TARGET ${nm} APPEND PROPERTY COMPILE_DEFINITIONS ${d} )
305
309
endforeach ()
306
310
311
+ set (extra_flags "" )
312
+
307
313
if (MSVC )
308
314
# Compile with multiple processors
309
- set (msvc_flags "/MP" )
315
+ set (extra_flags "/MP" )
310
316
if (WANT_STATIC_RUNTIME)
311
317
if (CMAKE_BUILD_TYPE STREQUAL Debug)
312
- set (msvc_flags "${msvc_flags } /MTd" )
318
+ set (extra_flags "${extra_flags } /MTd" )
313
319
else ()
314
- set (msvc_flags "${msvc_flags } /MT" )
320
+ set (extra_flags "${extra_flags } /MT" )
315
321
endif ()
316
322
endif ()
317
- set_target_properties (${nm} PROPERTIES COMPILE_FLAGS "${msvc_flags} " )
318
323
endif ()
319
324
325
+ if (WIN32 )
326
+ set (extra_flags "${extra_flags} -DUNICODE -D_UNICODE" )
327
+ endif ()
328
+
329
+ set_target_properties (${nm} PROPERTIES COMPILE_FLAGS "${extra_flags} " )
330
+
320
331
if (MINGW)
321
332
if (NOT CMAKE_BUILD_TYPE STREQUAL Debug)
322
333
set_target_properties (${nm} PROPERTIES LINK_FLAGS "-Wl,-subsystem,windows" )
You can’t perform that action at this time.
0 commit comments