mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-06 06:32:56 +01:00
Work on fixing openrct2-gui compilation
This commit is contained in:
committed by
Gymnasiast
parent
3a194f30dc
commit
52552a9dc4
@@ -11,7 +11,6 @@ option(DISABLE_OPENGL "Disable OpenGL support.")
|
||||
include(FindPkgConfig)
|
||||
|
||||
# Third party libraries
|
||||
PKG_CHECK_MODULES(GL REQUIRED gl)
|
||||
PKG_CHECK_MODULES(SDL2 REQUIRED sdl2)
|
||||
if (NOT DISABLE_OPENGL)
|
||||
# GL doesn't work nicely with macOS, while find_package doesn't work with multiarch on Ubuntu.
|
||||
@@ -29,10 +28,18 @@ file(GLOB_RECURSE OPENRCT2_UI_SOURCES
|
||||
"${CMAKE_CURRENT_LIST_DIR}/*.h"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/*.hpp")
|
||||
|
||||
if (APPLE)
|
||||
file(GLOB_RECURSE OPENRCT2_UI_M_SOURCES "${CMAKE_CURRENT_LIST_DIR}/*.m")
|
||||
set_source_files_properties(${OPENRCT2_UI_M_SOURCES} PROPERTIES COMPILE_FLAGS "-x objective-c -fmodules")
|
||||
|
||||
file(GLOB_RECURSE OPENRCT2_UI_MM_SOURCES "${CMAKE_CURRENT_LIST_DIR}/*.mm")
|
||||
set_source_files_properties(${OPENRCT2_UI_MM_SOURCES} PROPERTIES COMPILE_FLAGS "-x objective-c++ -fmodules")
|
||||
endif ()
|
||||
|
||||
# Outputs
|
||||
set (PROJECT openrct2)
|
||||
project(${PROJECT})
|
||||
add_executable(${PROJECT} ${OPENRCT2_UI_SOURCES})
|
||||
add_executable(${PROJECT} ${OPENRCT2_UI_SOURCES} ${OPENRCT2_UI_M_SOURCES} ${OPENRCT2_UI_MM_SOURCES})
|
||||
|
||||
target_link_libraries(${PROJECT} "libopenrct2"
|
||||
${SDL2_LIBRARIES}
|
||||
|
||||
Reference in New Issue
Block a user