mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-12 06:19:57 -05:00
Several fix for compiling on Mac. Specifying the output name of the web helper instead (#3651)
* Fix compile issue on Apple reg ALSA. since ALSA won't be available on Apple machines, we need to choose coreaudio instead. * Changes for target without spaces. newer versions of CMake don't allow targets to have spaces, but we can specify TARGET_OUTPUT_NAME with spaces
This commit is contained in:
@@ -46,8 +46,10 @@ begin_dependency("SoLoud")
|
||||
set(SOLOUD_BACKEND_SDL2 OFF CACHE BOOL "")
|
||||
if (WIN32)
|
||||
set(SOLOUD_BACKEND_WINMM ON CACHE BOOL "")
|
||||
elseif (UNIX)
|
||||
elseif (UNIX AND NOT APPLE)
|
||||
set(SOLOUD_BACKEND_ALSA ON CACHE BOOL "")
|
||||
elseif (APPLE)
|
||||
set(SOLOUD_BACKEND_COREAUDIO ON CACHE BOOL "")
|
||||
endif ()
|
||||
add_subdirectory(ext/soloud/contrib SYSTEM)
|
||||
|
||||
|
||||
@@ -172,13 +172,14 @@ set(WEBBROWSER_RESOURCES_SRCS
|
||||
|
||||
# Place Helper in separate executable
|
||||
# The naming style "<ApplicationName> Helper" is required by Chromium.
|
||||
if (OS_MACOSX)
|
||||
set(CEF_HELPER_TARGET "OpenSpace Helper" CACHE INTERNAL "CEF_HELPER_TARGET")
|
||||
else ()
|
||||
set(CEF_HELPER_TARGET "OpenSpace_Helper" CACHE INTERNAL "CEF_HELPER_TARGET")
|
||||
endif ()
|
||||
set(CEF_HELPER_TARGET_GPU "OpenSpace Helper (GPU)" CACHE INTERNAL "CEF_HELPER_TARGET_GPU")
|
||||
set(CEF_HELPER_TARGET_RENDERER "OpenSpace Helper (Renderer)" CACHE INTERNAL "CEF_HELPER_TARGET_RENDERER")
|
||||
set(CEF_HELPER_TARGET "OpenSpace_Helper" CACHE INTERNAL "CEF_HELPER_TARGET")
|
||||
set(CEF_HELPER_TARGET_OUTPUT_NAME "OpenSpace Helper" CACHE INTERNAL "")
|
||||
|
||||
set(CEF_HELPER_TARGET_GPU "OpenSpace_Helper_GPU" CACHE INTERNAL "CEF_HELPER_TARGET_GPU")
|
||||
set(CEF_HELPER_TARGET_GPU_OUTPUT_NAME "OpenSpace Helper (GPU)" CACHE INTERNAL "")
|
||||
|
||||
set(CEF_HELPER_TARGET_RENDERER "OpenSpace_Helper_Renderer" CACHE INTERNAL "CEF_HELPER_TARGET_RENDERER")
|
||||
set(CEF_HELPER_TARGET_RENDERER_OUTPUT_NAME "OpenSpace Helper (Renderer)" CACHE INTERNAL "")
|
||||
|
||||
#
|
||||
# CEF platform-specific config
|
||||
@@ -198,6 +199,7 @@ if (OS_MACOSX)
|
||||
target_link_libraries(${target} libcef_dll_wrapper ${CEF_STANDARD_LIBS})
|
||||
set_target_properties(${target} PROPERTIES
|
||||
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/mac/helper-Info.plist
|
||||
OUTPUT_NAME "${target}_OUTPUT_NAME"
|
||||
)
|
||||
|
||||
target_compile_options(${target} PRIVATE -Wno-deprecated-declarations)
|
||||
|
||||
Reference in New Issue
Block a user