diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2017-12-14 04:40:47 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2017-12-14 04:40:47 +0000 |
| commit | b65d0410dc69ca92482d5d2cc736e93bfa61d71e (patch) | |
| tree | 4ca7ae0ea5dedecc94fb1d6307f12a2371d1a045 /unityplugin | |
| parent | Optimized CMake files with set_common_target_properties() (diff) | |
| download | DiligentEngine-b65d0410dc69ca92482d5d2cc736e93bfa61d71e.tar.gz DiligentEngine-b65d0410dc69ca92482d5d2cc736e93bfa61d71e.zip | |
Added /ZW to CMake UWP build; updated readme
Diffstat (limited to 'unityplugin')
| -rw-r--r-- | unityplugin/GhostCubeScene/CMakeLists.txt | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/unityplugin/GhostCubeScene/CMakeLists.txt b/unityplugin/GhostCubeScene/CMakeLists.txt index cdf461d..b78fb54 100644 --- a/unityplugin/GhostCubeScene/CMakeLists.txt +++ b/unityplugin/GhostCubeScene/CMakeLists.txt @@ -17,19 +17,20 @@ elseif(PLATFORM_ANDROID) list(APPEND SOURCE src/Android/AndroidMain.cpp) endif() -if(PLATFORM_WIN32) - add_executable(GhostCubeScene WIN32 ${SOURCE} ${INCLUDE}) - set_target_properties(GhostCubeScene PROPERTIES - VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/build/assets" - ) - - add_custom_command(TARGET GhostCubeScene POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy_if_different - "\"$<TARGET_FILE:GhostCubePlugin-shared>\"" - "\"$<TARGET_FILE_DIR:GhostCubeScene>\"") +if(PLATFORM_WIN32 OR PLATFORM_UNIVERSAL_WINDOWS) -elseif(PLATFORM_UNIVERSAL_WINDOWS) add_executable(GhostCubeScene WIN32 ${SOURCE} ${INCLUDE}) + + if(PLATFORM_WIN32) + set_target_properties(GhostCubeScene PROPERTIES + VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/build/assets" + ) + + add_custom_command(TARGET GhostCubeScene POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different + "\"$<TARGET_FILE:GhostCubePlugin-shared>\"" + "\"$<TARGET_FILE_DIR:GhostCubeScene>\"") + endif() #elseif(APPLE) #add_executable(GhostCubeScene MACOSX_BUNDLE Main.cpp) @@ -63,8 +64,13 @@ set_common_target_properties(GhostCubeScene) if(MSVC) # Disable MSVC-specific warnings - # - w4201: nonstandard extension used: nameless struct/unio + # - w4201: nonstandard extension used: nameless struct/union target_compile_options(GhostCubeScene PRIVATE /wd4201) + + if(PLATFORM_UNIVERSAL_WINDOWS) + # Consume the windows runtime extensions + target_compile_options(GhostCubeScene PRIVATE /ZW) + endif() endif() source_group("src" FILES ${SOURCE}) |
