diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index f2e6edeb7e..fbbbbe78e0 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -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) diff --git a/examples/Utilities/PushNotificationsDemo.h b/examples/Utilities/PushNotificationsDemo.h index cf03cc18a1..ec8a4ae547 100644 --- a/examples/Utilities/PushNotificationsDemo.h +++ b/examples/Utilities/PushNotificationsDemo.h @@ -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 diff --git a/extras/Build/CMake/JUCEUtils.cmake b/extras/Build/CMake/JUCEUtils.cmake index bd014d16d3..859ae80f11 100644 --- a/extras/Build/CMake/JUCEUtils.cmake +++ b/extras/Build/CMake/JUCEUtils.cmake @@ -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()