From efa05f5b3a8737364f9386bd64204836fc08dac0 Mon Sep 17 00:00:00 2001 From: Tom Rees-Herdman Date: Mon, 30 Dec 2024 17:09:01 +0000 Subject: [PATCH] Fix build errors... --- src/ppui/CMakeLists.txt | 8 +++----- src/ppui/osinterface/CMakeLists.txt | 12 +++++++++++- src/tools/export-to-wav/CMakeLists.txt | 1 + src/tracker/CMakeLists.txt | 1 + 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/ppui/CMakeLists.txt b/src/ppui/CMakeLists.txt index df809706..447860b8 100644 --- a/src/ppui/CMakeLists.txt +++ b/src/ppui/CMakeLists.txt @@ -104,13 +104,10 @@ add_library(ppui STATIC target_include_directories(ppui PUBLIC - . - PRIVATE - osinterface + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/osinterface ) -target_link_libraries(ppui PRIVATE osinterface) - # Add platform-specific sources and include paths if(APPLE) target_sources(ppui @@ -123,6 +120,7 @@ if(APPLE) ${PROJECT_SOURCE_DIR}/src/tracker/cocoa PUBLIC cocoa + ${CMAKE_CURRENT_SOURCE_DIR}/osinterface/posix ) elseif(WIN32) target_sources(ppui diff --git a/src/ppui/osinterface/CMakeLists.txt b/src/ppui/osinterface/CMakeLists.txt index 6452f515..a30fd67e 100644 --- a/src/ppui/osinterface/CMakeLists.txt +++ b/src/ppui/osinterface/CMakeLists.txt @@ -59,7 +59,17 @@ if(APPLE) posix/PPSystemString_POSIX.h posix/PPSystem_POSIX.h ) - target_include_directories(osinterface PUBLIC posix) + target_include_directories(osinterface + PUBLIC + posix + ${PROJECT_SOURCE_DIR}/src/tracker/cocoa + ) + + # Link against Cocoa framework and make osinterface PUBLIC + target_link_libraries(osinterface + PUBLIC + "-framework Cocoa" + ) elseif(WIN32) target_sources(osinterface PRIVATE diff --git a/src/tools/export-to-wav/CMakeLists.txt b/src/tools/export-to-wav/CMakeLists.txt index edf22305..a6e9cbe3 100644 --- a/src/tools/export-to-wav/CMakeLists.txt +++ b/src/tools/export-to-wav/CMakeLists.txt @@ -7,6 +7,7 @@ add_executable(export-to-wav target_link_libraries(export-to-wav PRIVATE trackerlib compression + osinterface ${LHASA_LIBRARIES} ${ZZIPLIB_LIBRARIES} ${ZLIB_LIBRARIES} diff --git a/src/tracker/CMakeLists.txt b/src/tracker/CMakeLists.txt index a37d6c2e..d99c43fc 100644 --- a/src/tracker/CMakeLists.txt +++ b/src/tracker/CMakeLists.txt @@ -163,6 +163,7 @@ target_include_directories(tracker target_link_libraries(tracker fx trackerlib + osinterface ) if(CMAKE_VERSION GREATER_EQUAL 3.12)