Browse Source

CMake: Fix demos which failed to build on Windows

The PushNotificationsDemo is not supported on Windows, so I've
stopped CMake from configuring it in the first place.
tags/2021-05-28
reuk 5 years ago
parent
commit
e9321bf565
3 changed files with 10 additions and 2 deletions
  1. +4
    -1
      examples/CMakeLists.txt
  2. +1
    -1
      examples/Utilities/PushNotificationsDemo.h
  3. +5
    -0
      extras/Build/CMake/JUCEUtils.cmake

+ 4
- 1
examples/CMakeLists.txt View File

@@ -36,7 +36,10 @@ function(_juce_add_pips)
"${CMAKE_CURRENT_SOURCE_DIR}/CameraDemo.h"
"${CMAKE_CURRENT_SOURCE_DIR}/PushNotificationsDemo.h"
"${CMAKE_CURRENT_SOURCE_DIR}/VideoDemo.h")
endif()
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
list(REMOVE_ITEM headers
"${CMAKE_CURRENT_SOURCE_DIR}/PushNotificationsDemo.h")
endif()

foreach(header IN ITEMS ${headers})
juce_add_pip(${header} added_target)


+ 1
- 1
examples/Utilities/PushNotificationsDemo.h View File

@@ -34,7 +34,7 @@
juce_audio_processors, juce_audio_utils, juce_core,
juce_data_structures, juce_events, juce_graphics,
juce_gui_basics, juce_gui_extra
exporters: xcode_mac, vs2019, xcode_iphone, androidstudio
exporters: xcode_mac, xcode_iphone, androidstudio
moduleFlags: JUCE_STRICT_REFCOUNTEDPOINTER=1
JUCE_PUSH_NOTIFICATIONS=1


+ 5
- 0
extras/Build/CMake/JUCEUtils.cmake View File

@@ -1961,6 +1961,11 @@ endfunction()
function(juce_add_console_app target)
add_executable(${target})
target_compile_definitions(${target} PRIVATE JUCE_STANDALONE_APPLICATION=1)

if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
target_compile_definitions(${target} PRIVATE _CONSOLE=1)
endif()

_juce_initialise_target(${target} ${ARGN})
endfunction()



Loading…
Cancel
Save