Fix build issues. https://github.com/elasota/Aerofoil/commit/e78b01a5f32c1f3d9ce375ec5e5ef9841c5e01a7 --- AerofoilX/GpMain_SDL_X.cpp.orig 2021-11-10 17:05:19.000000000 -0600 +++ AerofoilX/GpMain_SDL_X.cpp 2022-03-16 20:45:44.000000000 -0500 @@ -20,7 +20,9 @@ #include "IGpVOSEventQueue.h" #include +#ifdef __MACOS__ #include "MacInit.h" +#endif GpXGlobals g_gpXGlobals; --- CMakeLists.txt.orig 2021-11-10 17:05:19.000000000 -0600 +++ CMakeLists.txt 2022-03-16 22:29:17.000000000 -0500 @@ -45,6 +45,7 @@ PortabilityLayer/BitmapImage.cpp PortabilityLayer/ByteSwap.cpp PortabilityLayer/CFileStream.cpp + PortabilityLayer/CompositeRenderedFont.cpp PortabilityLayer/DeflateCodec.cpp PortabilityLayer/DialogManager.cpp PortabilityLayer/DisplayDeviceManager.cpp @@ -240,7 +241,8 @@ target_link_libraries(GpApp PortabilityLayer) if(CMAKE_HOST_UNIX) - add_executable(${EXECNAME} + set(EXEC_SOURCES ) + list(APPEND EXEC_SOURCES AerofoilPortable/GpSystemServices_POSIX.cpp AerofoilPortable/GpThreadEvent_Cpp11.cpp AerofoilPortable/GpAllocator_C.cpp @@ -257,8 +259,16 @@ AerofoilX/GpSystemServices_X.cpp AerofoilX/GpFileSystem_X.cpp ) - - target_include_directories(${EXECNAME} PRIVATE + + set(EXEC_LIBS ) + list(APPEND EXEC_LIBS + ${SDL2_LIBRARIES} + GpApp + GpShell + ) + + set(EXEC_INC_DIRS ) + list(APPEND EXEC_INC_DIRS $ $ $ @@ -267,8 +277,22 @@ $ ${SDL2_INCLUDE_DIRS} ) - - target_link_libraries(${EXECNAME} ${SDL2_LIBRARIES} GpApp GpShell) + if(PLATFORM STREQUAL "MAC") + list(APPEND EXEC_SOURCES + AerofoilMac/AerofoilMac/AerofoilApplication.mm + AerofoilMac/AerofoilMac/MacInit.mm + ) + list(APPEND EXEC_INC_DIRS + $ + ) + list(APPEND EXEC_LIBS + "-framework Cocoa" + ) + endif(PLATFORM STREQUAL "MAC") + + add_executable(${EXECNAME} ${EXEC_SOURCES}) + target_include_directories(${EXECNAME} PRIVATE ${EXEC_INC_DIRS}) + target_link_libraries(${EXECNAME} ${EXEC_LIBS}) endif()