From f8fc40e8bc9d6bc4951a0d3e73d549a186033f54 Mon Sep 17 00:00:00 2001 From: Jean-Philip Desjardins Date: Tue, 11 Mar 2025 09:06:27 -0400 Subject: [PATCH] Cleanup CMake variable names to avoid reusing previously defined stuff. --- Source/CMakeLists.txt | 1 + Source/ui_android/CMakeLists.txt | 12 +++--- Source/ui_ios/CMakeLists.txt | 22 +++++----- Source/ui_js/CMakeLists.txt | 10 ++--- Source/ui_libretro/CMakeLists.txt | 18 ++++---- Source/ui_qt/CMakeLists.txt | 42 +++++++++---------- tools/AutoTest/CMakeLists.txt | 6 +-- tools/PsfPlayer/Source/CMakeLists.txt | 12 +++--- .../PsfPlayer/Source/SH_OpenAL/CMakeLists.txt | 6 +-- tools/PsfPlayer/Source/ui_aot/CMakeLists.txt | 4 +- tools/PsfPlayer/Source/ui_ios/CMakeLists.txt | 6 +-- tools/PsfPlayer/Source/ui_js/CMakeLists.txt | 6 +-- .../PsfPlayer/Source/ui_win32/CMakeLists.txt | 14 +++---- 13 files changed, 79 insertions(+), 80 deletions(-) diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 313151e5f..56a16be81 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -9,6 +9,7 @@ include(Header) project(PlayCore) set(PROJECT_LIBS) +set(DEFINITIONS_LIST) include(PrecompiledHeader) diff --git a/Source/ui_android/CMakeLists.txt b/Source/ui_android/CMakeLists.txt index 90f9453d6..d797ed94e 100644 --- a/Source/ui_android/CMakeLists.txt +++ b/Source/ui_android/CMakeLists.txt @@ -14,7 +14,7 @@ if(NOT TARGET PlayCore) ${CMAKE_CURRENT_BINARY_DIR}/Source ) endif() -list(APPEND PROJECT_LIBS PlayCore) +list(APPEND UI_ANDROID_PROJECT_LIBS PlayCore) if(NOT TARGET gsh_opengl) add_subdirectory( @@ -22,7 +22,7 @@ if(NOT TARGET gsh_opengl) ${CMAKE_CURRENT_BINARY_DIR}/gs/GSH_OpenGL ) endif() -list(INSERT PROJECT_LIBS 0 gsh_opengl) +list(INSERT UI_ANDROID_PROJECT_LIBS 0 gsh_opengl) if(NOT TARGET gsh_vulkan) add_subdirectory( @@ -30,7 +30,7 @@ if(NOT TARGET gsh_vulkan) ${CMAKE_CURRENT_BINARY_DIR}/gs/GSH_Vulkan ) endif() -list(INSERT PROJECT_LIBS 0 gsh_vulkan) +list(INSERT UI_ANDROID_PROJECT_LIBS 0 gsh_vulkan) if(NOT TARGET ui_shared) add_subdirectory( @@ -38,7 +38,7 @@ if(NOT TARGET ui_shared) ${CMAKE_CURRENT_BINARY_DIR}/ui_shared ) endif() -list(APPEND PROJECT_LIBS ui_shared) +list(APPEND UI_ANDROID_PROJECT_LIBS ui_shared) set(ANDROID_SRC_FILES BootablesInterop.cpp @@ -57,7 +57,7 @@ set(ANDROID_SRC_FILES StatsInterop.cpp ) -list(APPEND PROJECT_LIBS android log OpenSLES) +list(APPEND UI_ANDROID_PROJECT_LIBS android log OpenSLES) add_library(Play SHARED ${ANDROID_SRC_FILES}) -target_link_libraries(Play ${PROJECT_LIBS}) +target_link_libraries(Play ${UI_ANDROID_PROJECT_LIBS}) diff --git a/Source/ui_ios/CMakeLists.txt b/Source/ui_ios/CMakeLists.txt index 6af3f8bce..40398f15b 100644 --- a/Source/ui_ios/CMakeLists.txt +++ b/Source/ui_ios/CMakeLists.txt @@ -23,7 +23,7 @@ if(NOT TARGET PlayCore) ${CMAKE_CURRENT_BINARY_DIR}/Source ) endif() -list(APPEND PROJECT_LIBS PlayCore) +list(APPEND UI_IOS_PROJECT_LIBS PlayCore) if(NOT TARGET gsh_opengl) add_subdirectory( @@ -31,7 +31,7 @@ if(NOT TARGET gsh_opengl) ${CMAKE_CURRENT_BINARY_DIR}/gs/GSH_OpenGL ) endif() -list(INSERT PROJECT_LIBS 0 gsh_opengl) +list(INSERT UI_IOS_PROJECT_LIBS 0 gsh_opengl) if(USE_GSH_VULKAN) if(NOT TARGET gsh_vulkan) @@ -40,8 +40,8 @@ if(USE_GSH_VULKAN) ${CMAKE_CURRENT_BINARY_DIR}/gs/GSH_Vulkan ) endif() - list(INSERT PROJECT_LIBS 0 gsh_vulkan) - list(APPEND DEFINITIONS_LIST HAS_GSH_VULKAN=1) + list(INSERT UI_IOS_PROJECT_LIBS 0 gsh_vulkan) + list(APPEND UI_IOS_DEFINITIONS_LIST HAS_GSH_VULKAN=1) endif() if(NOT TARGET sh_openal) @@ -50,7 +50,7 @@ if(NOT TARGET sh_openal) ${CMAKE_CURRENT_BINARY_DIR}/SH_OpenAL ) endif() -list(APPEND PROJECT_LIBS sh_openal) +list(APPEND UI_IOS_PROJECT_LIBS sh_openal) if(NOT TARGET iCade_Static) add_subdirectory( @@ -58,7 +58,7 @@ if(NOT TARGET iCade_Static) ${CMAKE_CURRENT_BINARY_DIR}/iCade-iOS ) endif() -list(APPEND PROJECT_LIBS iCade_Static) +list(APPEND UI_IOS_PROJECT_LIBS iCade_Static) if(NOT TARGET SDWebImage_Static) add_subdirectory( @@ -66,7 +66,7 @@ if(NOT TARGET SDWebImage_Static) ${CMAKE_CURRENT_BINARY_DIR}/SDWebImage ) endif() -list(APPEND PROJECT_LIBS SDWebImage_Static) +list(APPEND UI_IOS_PROJECT_LIBS SDWebImage_Static) if(NOT TARGET ui_shared) add_subdirectory( @@ -74,7 +74,7 @@ if(NOT TARGET ui_shared) ${CMAKE_CURRENT_BINARY_DIR}/ui_shared ) endif() -list(APPEND PROJECT_LIBS ui_shared) +list(APPEND UI_IOS_PROJECT_LIBS ui_shared) if(NOT TARGET AltKit) add_subdirectory( @@ -82,7 +82,7 @@ if(NOT TARGET AltKit) ${CMAKE_CURRENT_BINARY_DIR}/AltKit ) endif() -list(APPEND PROJECT_LIBS AltKit) +list(APPEND UI_IOS_PROJECT_LIBS AltKit) find_library(UIKIT_LIBRARY NAMES UIKit) find_library(COREGRAPHICS_LIBRARY NAMES CoreGraphics) @@ -165,9 +165,9 @@ target_link_libraries(Play ${COREGRAPHICS_LIBRARY}) target_link_libraries(Play ${GAMECONTROLLER_LIBRARY}) target_link_libraries(Play ${QUARTZCORE_LIBRARY}) target_link_libraries(Play ${IMAGEIO_LIBRARY}) -target_link_libraries(Play ${PROJECT_LIBS} "-ObjC -lsqlite3 -framework OpenAL") +target_link_libraries(Play ${UI_IOS_PROJECT_LIBS} "-ObjC -lsqlite3 -framework OpenAL") -target_compile_definitions(Play PRIVATE ${DEFINITIONS_LIST}) +target_compile_definitions(Play PRIVATE ${UI_IOS_DEFINITIONS_LIST}) # Set a custom plist file for the app bundle # NOTE: for these values to be used Info.plist has to be edited diff --git a/Source/ui_js/CMakeLists.txt b/Source/ui_js/CMakeLists.txt index 8d3bfb317..9f4ad6dfe 100644 --- a/Source/ui_js/CMakeLists.txt +++ b/Source/ui_js/CMakeLists.txt @@ -14,7 +14,7 @@ if(NOT TARGET PlayCore) ${CMAKE_CURRENT_BINARY_DIR}/Source ) endif() -list(APPEND PROJECT_LIBS PlayCore) +list(APPEND UI_JS_PROJECT_LIBS PlayCore) if(NOT TARGET ui_shared) add_subdirectory( @@ -22,7 +22,7 @@ if(NOT TARGET ui_shared) ${CMAKE_CURRENT_BINARY_DIR}/ui_shared ) endif() -list(APPEND PROJECT_LIBS ui_shared) +list(APPEND UI_JS_PROJECT_LIBS ui_shared) if(NOT TARGET gsh_opengl) add_subdirectory( @@ -30,7 +30,7 @@ if(NOT TARGET gsh_opengl) ${CMAKE_CURRENT_BINARY_DIR}/gs/GSH_OpenGL ) endif() -list(APPEND PROJECT_LIBS gsh_opengl) +list(APPEND UI_JS_PROJECT_LIBS gsh_opengl) if(NOT TARGET sh_openal) add_subdirectory( @@ -38,7 +38,7 @@ if(NOT TARGET sh_openal) ${CMAKE_CURRENT_BINARY_DIR}/SH_OpenAL ) endif() -list(APPEND PROJECT_LIBS sh_openal) +list(APPEND UI_JS_PROJECT_LIBS sh_openal) add_executable(Play GSH_OpenGLJs.cpp @@ -51,7 +51,7 @@ add_executable(Play ${CMAKE_CURRENT_SOURCE_DIR}/../../tools/PsfPlayer/Source/ui_js/SH_OpenALProxy.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../../tools/PsfPlayer/Source/ui_js/SH_OpenALProxy.h ) -target_link_libraries(Play PUBLIC ${PROJECT_LIBS}) +target_link_libraries(Play PUBLIC ${UI_JS_PROJECT_LIBS}) target_link_options(Play PRIVATE "--bind") target_link_options(Play PRIVATE "-sMODULARIZE=1") diff --git a/Source/ui_libretro/CMakeLists.txt b/Source/ui_libretro/CMakeLists.txt index 72d86828b..48a387a01 100644 --- a/Source/ui_libretro/CMakeLists.txt +++ b/Source/ui_libretro/CMakeLists.txt @@ -16,7 +16,7 @@ if(NOT TARGET ui_shared) ${CMAKE_CURRENT_BINARY_DIR}/ui_shared ) endif() -list(APPEND PROJECT_LIBS ui_shared) +list(APPEND UI_LIBRETRO_PROJECT_LIBS ui_shared) if(NOT TARGET PlayCore) add_subdirectory( @@ -24,7 +24,7 @@ if(NOT TARGET PlayCore) ${CMAKE_CURRENT_BINARY_DIR}/Source ) endif() -list(APPEND PROJECT_LIBS PlayCore) +list(APPEND UI_LIBRETRO_PROJECT_LIBS PlayCore) if(NOT TARGET gsh_opengl) add_subdirectory( @@ -32,7 +32,7 @@ if(NOT TARGET gsh_opengl) ${CMAKE_CURRENT_BINARY_DIR}/gs/GSH_OpenGL ) endif() -list(INSERT PROJECT_LIBS 0 gsh_opengl) +list(INSERT UI_LIBRETRO_PROJECT_LIBS 0 gsh_opengl) set(SRC main_libretro.cpp @@ -45,17 +45,17 @@ set(SRC ) if(TARGET_PLATFORM_ANDROID) - list(APPEND PROJECT_LIBS android log GLESv3 EGL) + list(APPEND UI_LIBRETRO_PROJECT_LIBS android log GLESv3 EGL) elseif(TARGET_PLATFORM_IOS) - list(APPEND PROJECT_LIBS "-ObjC -lsqlite3 -framework OpenGLES") + list(APPEND UI_LIBRETRO_PROJECT_LIBS "-ObjC -lsqlite3 -framework OpenGLES") elseif(TARGET_PLATFORM_UNIX) - list(APPEND PROJECT_LIBS "-static-libgcc") - list(APPEND PROJECT_LIBS "-static-libstdc++") + list(APPEND UI_LIBRETRO_PROJECT_LIBS "-static-libgcc") + list(APPEND UI_LIBRETRO_PROJECT_LIBS "-static-libstdc++") endif() if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 8 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -lstdc++fs") - list(APPEND PROJECT_LIBS "libstdc++fs.a") + list(APPEND UI_LIBRETRO_PROJECT_LIBS "libstdc++fs.a") endif() add_library(play_libretro SHARED ${SRC}) @@ -76,5 +76,5 @@ if(TARGET_PLATFORM_IOS) endif() endif() -target_link_libraries(play_libretro ${PROJECT_LIBS}) +target_link_libraries(play_libretro ${UI_LIBRETRO_PROJECT_LIBS}) set_target_properties(play_libretro PROPERTIES PREFIX "") diff --git a/Source/ui_qt/CMakeLists.txt b/Source/ui_qt/CMakeLists.txt index 6e3a1bf7b..a66c5b569 100644 --- a/Source/ui_qt/CMakeLists.txt +++ b/Source/ui_qt/CMakeLists.txt @@ -25,7 +25,7 @@ if(NOT TARGET PlayCore) ${CMAKE_CURRENT_BINARY_DIR}/Source ) endif() -list(APPEND PROJECT_LIBS PlayCore) +list(APPEND UI_QT_PROJECT_LIBS PlayCore) if(NOT TARGET gsh_opengl) add_subdirectory( @@ -33,7 +33,7 @@ if(NOT TARGET gsh_opengl) ${CMAKE_CURRENT_BINARY_DIR}/gs/GSH_OpenGL ) endif() -list(INSERT PROJECT_LIBS 0 gsh_opengl) +list(INSERT UI_QT_PROJECT_LIBS 0 gsh_opengl) if(USE_GSH_VULKAN) if(NOT TARGET gsh_vulkan) @@ -42,8 +42,8 @@ if(USE_GSH_VULKAN) ${CMAKE_CURRENT_BINARY_DIR}/gs/GSH_Vulkan ) endif() - list(INSERT PROJECT_LIBS 0 gsh_vulkan) - list(APPEND DEFINITIONS_LIST HAS_GSH_VULKAN=1) + list(INSERT UI_QT_PROJECT_LIBS 0 gsh_vulkan) + list(APPEND UI_QT_DEFINITIONS_LIST HAS_GSH_VULKAN=1) set(GSH_VULKAN_QT_SRC GSH_VulkanQt.cpp GSH_VulkanQt.h @@ -58,16 +58,16 @@ endif() if(TARGET_PLATFORM_UNIX) find_package(LIBEVDEV) if(LIBEVDEV_FOUND) - list(APPEND PROJECT_LIBS ${LIBEVDEV_LIBRARY}) - list(APPEND DEFINITIONS_LIST HAS_LIBEVDEV=1) + list(APPEND UI_QT_PROJECT_LIBS ${LIBEVDEV_LIBRARY}) + list(APPEND UI_QT_DEFINITIONS_LIST HAS_LIBEVDEV=1) endif() - list(APPEND PROJECT_LIBS "-static-libgcc") - list(APPEND PROJECT_LIBS "-static-libstdc++") + list(APPEND UI_QT_PROJECT_LIBS "-static-libgcc") + list(APPEND UI_QT_PROJECT_LIBS "-static-libstdc++") if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") # most unix system seem to implicitly link to libinotify, but not FreeBSD - list(APPEND PROJECT_LIBS "libinotify.so") + list(APPEND UI_QT_PROJECT_LIBS "libinotify.so") endif() endif() @@ -78,7 +78,7 @@ if(TARGET_PLATFORM_MACOS OR TARGET_PLATFORM_UNIX) ${CMAKE_CURRENT_BINARY_DIR}/SH_OpenAL ) endif() - list(APPEND PROJECT_LIBS sh_openal) + list(APPEND UI_QT_PROJECT_LIBS sh_openal) endif() if(NOT TARGET ui_shared) @@ -87,7 +87,7 @@ if(NOT TARGET ui_shared) ${CMAKE_CURRENT_BINARY_DIR}/ui_shared ) endif() -list(APPEND PROJECT_LIBS ui_shared) +list(APPEND UI_QT_PROJECT_LIBS ui_shared) set(QT_SOURCES BootableModel.cpp @@ -170,13 +170,13 @@ if(TARGET_PLATFORM_WIN32) ${CMAKE_CURRENT_BINARY_DIR}/Framework_Win32 ) endif() - list(APPEND PROJECT_LIBS Framework_Win32) + list(APPEND UI_QT_PROJECT_LIBS Framework_Win32) set(QT_SOURCES ${QT_SOURCES} ../../tools/PsfPlayer/Source/ui_win32/SH_WaveOut.cpp ) - list(APPEND PROJECT_LIBS winmm) + list(APPEND UI_QT_PROJECT_LIBS winmm) if(TARGET_PLATFORM_WIN32_X86) set(MANIFEST win32/Play-x86.manifest) @@ -193,8 +193,8 @@ if(TARGET_PLATFORM_WIN32) ${MANIFEST} ) - list(APPEND PROJECT_LIBS dinput8) - list(APPEND PROJECT_LIBS xinput) + list(APPEND UI_QT_PROJECT_LIBS dinput8) + list(APPEND UI_QT_PROJECT_LIBS xinput) endif() if(DEBUGGER_INCLUDED) @@ -204,7 +204,7 @@ if(DEBUGGER_INCLUDED) ${CMAKE_CURRENT_BINARY_DIR}/PlayDebugSupport ) endif() - list(APPEND PROJECT_LIBS PlayDebugSupport) + list(APPEND UI_QT_PROJECT_LIBS PlayDebugSupport) endif() set(QT_MOC_HEADERS @@ -257,9 +257,9 @@ if(NOT Qt6_FOUND) find_package(Qt5 REQUIRED COMPONENTS ${QT_COMPONENTS}) endif() -list(APPEND PROJECT_LIBS Qt::Widgets Qt::Core) +list(APPEND UI_QT_PROJECT_LIBS Qt::Widgets Qt::Core) if(TARGET_PLATFORM_UNIX AND Qt5_FOUND) - list(APPEND PROJECT_LIBS Qt::X11Extras) + list(APPEND UI_QT_PROJECT_LIBS Qt::X11Extras) endif() add_definitions(${QT_DEFINITIONS}) @@ -305,7 +305,7 @@ if(TARGET_PLATFORM_MACOS) RESOURCE "${OSX_RES}" ) SET_SOURCE_FILES_PROPERTIES(${ARCADE_DEFS} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources/arcadedefs") - list(APPEND PROJECT_LIBS "-framework IOKit -framework CoreFoundation") + list(APPEND UI_QT_PROJECT_LIBS "-framework IOKit -framework CoreFoundation") if(USE_GSH_VULKAN) target_include_directories(Play PRIVATE $ENV{VULKAN_SDK}/../MoltenVK/include) endif() @@ -354,8 +354,8 @@ else() add_executable(Play ${QT_SOURCES} ${QT_MOC_SRCS} ${QT_RES_SOURCES} ${QT_UI_HEADERS}) endif() -target_link_libraries(Play ${PROJECT_LIBS}) -target_compile_definitions(Play PRIVATE ${DEFINITIONS_LIST}) +target_link_libraries(Play ${UI_QT_PROJECT_LIBS}) +target_compile_definitions(Play PRIVATE ${UI_QT_DEFINITIONS_LIST}) target_include_directories(Play PRIVATE ./ diff --git a/tools/AutoTest/CMakeLists.txt b/tools/AutoTest/CMakeLists.txt index 10f46a512..0f46af2e4 100644 --- a/tools/AutoTest/CMakeLists.txt +++ b/tools/AutoTest/CMakeLists.txt @@ -21,7 +21,7 @@ if(TARGET_PLATFORM_WIN32) ${CMAKE_CURRENT_BINARY_DIR}/gs/GSH_OpenGLWin32 ) endif() - list(APPEND PROJECT_LIBS gsh_opengl_win32) + list(APPEND AUTOTEST_PROJECT_LIBS gsh_opengl_win32) if(NOT TARGET gsh_d3d9) add_subdirectory( @@ -29,11 +29,11 @@ if(TARGET_PLATFORM_WIN32) ${CMAKE_CURRENT_BINARY_DIR}/gs/GSH_Direct3D9 ) endif() - list(APPEND PROJECT_LIBS gsh_d3d9) + list(APPEND AUTOTEST_PROJECT_LIBS gsh_d3d9) endif() add_executable(autotest JUnitTestReportWriter.cpp Main.cpp ) -target_link_libraries(autotest PlayCore ${PROJECT_LIBS}) +target_link_libraries(autotest PlayCore ${AUTOTEST_PROJECT_LIBS}) diff --git a/tools/PsfPlayer/Source/CMakeLists.txt b/tools/PsfPlayer/Source/CMakeLists.txt index 399345403..7144c1a31 100644 --- a/tools/PsfPlayer/Source/CMakeLists.txt +++ b/tools/PsfPlayer/Source/CMakeLists.txt @@ -8,10 +8,8 @@ include(Header) project(PsfCore) -set(PROJECT_LIBS) set(PSF_PROJECT_NAME "PsfPlayer") set(PSF_PROJECT_VERSION "1.05") -set(PSF_DEFINITIONS) set(PSF_RAR_SUPPORT ON) if(NOT TARGET PlayCore) @@ -20,7 +18,7 @@ if(NOT TARGET PlayCore) ${CMAKE_CURRENT_BINARY_DIR}/PlayCore ) endif() -list(APPEND PROJECT_LIBS PlayCore) +list(APPEND PSFCORE_PROJECT_LIBS PlayCore) if(PSF_RAR_SUPPORT) if(NOT TARGET unrar) @@ -29,7 +27,7 @@ if(PSF_RAR_SUPPORT) ${CMAKE_CURRENT_BINARY_DIR}/unrarsrc-5.2.5 ) endif() - list(APPEND PROJECT_LIBS unrar) + list(APPEND PSFCORE_PROJECT_LIBS unrar) endif() ##PsfPlayerCore @@ -96,10 +94,10 @@ set(PSFCORE_SRC_FILES if(PSF_RAR_SUPPORT) list(APPEND PSFCORE_SRC_FILES PsfRarArchive.cpp) - list(APPEND PSF_DEFINITIONS -DRAR_SUPPORT) + list(APPEND PSFCORE_DEFINITIONS_LIST -DRAR_SUPPORT) endif() add_library(PsfCore STATIC ${PSFCORE_SRC_FILES}) -target_link_libraries(PsfCore ${PROJECT_LIBS}) +target_link_libraries(PsfCore ${PSFCORE_PROJECT_LIBS}) target_include_directories(PsfCore PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) -target_compile_definitions(PsfCore PRIVATE ${PSF_DEFINITIONS}) +target_compile_definitions(PsfCore PRIVATE ${PSFCORE_DEFINITIONS_LIST}) diff --git a/tools/PsfPlayer/Source/SH_OpenAL/CMakeLists.txt b/tools/PsfPlayer/Source/SH_OpenAL/CMakeLists.txt index 07099ede5..db5bbeea4 100644 --- a/tools/PsfPlayer/Source/SH_OpenAL/CMakeLists.txt +++ b/tools/PsfPlayer/Source/SH_OpenAL/CMakeLists.txt @@ -15,7 +15,7 @@ if(NOT TARGET Framework) ${CMAKE_CURRENT_BINARY_DIR}/Framework ) endif() -list(APPEND PROJECT_LIBS Framework) +list(APPEND SH_OPENAL_PROJECT_LIBS Framework) if(NOT TARGET Framework_OpenAl) add_subdirectory( @@ -23,10 +23,10 @@ add_subdirectory( ${CMAKE_CURRENT_BINARY_DIR}/FrameworkOpenAl ) endif() -list(APPEND PROJECT_LIBS Framework_OpenAl) +list(APPEND SH_OPENAL_PROJECT_LIBS Framework_OpenAl) add_library(sh_openal STATIC ../SH_OpenAL.cpp ../SH_OpenAL.h ) -target_link_libraries(sh_openal ${PROJECT_LIBS}) +target_link_libraries(sh_openal ${SH_OPENAL_PROJECT_LIBS}) diff --git a/tools/PsfPlayer/Source/ui_aot/CMakeLists.txt b/tools/PsfPlayer/Source/ui_aot/CMakeLists.txt index 138b3b7cd..c402d4ca4 100644 --- a/tools/PsfPlayer/Source/ui_aot/CMakeLists.txt +++ b/tools/PsfPlayer/Source/ui_aot/CMakeLists.txt @@ -14,7 +14,7 @@ if(NOT TARGET PsfCore) ${CMAKE_CURRENT_BINARY_DIR}/PsfCore ) endif() -list(APPEND PROJECT_LIBS PsfCore) +list(APPEND PSFAOT_PROJECT_LIBS PsfCore) add_executable(PsfAot Main_Aot.cpp) -target_link_libraries(PsfAot PUBLIC ${PROJECT_LIBS}) +target_link_libraries(PsfAot PUBLIC ${PSFAOT_PROJECT_LIBS}) diff --git a/tools/PsfPlayer/Source/ui_ios/CMakeLists.txt b/tools/PsfPlayer/Source/ui_ios/CMakeLists.txt index 0195d7774..08356f30d 100644 --- a/tools/PsfPlayer/Source/ui_ios/CMakeLists.txt +++ b/tools/PsfPlayer/Source/ui_ios/CMakeLists.txt @@ -16,7 +16,7 @@ if(NOT TARGET PsfCore) ${CMAKE_CURRENT_BINARY_DIR}/PsfCore ) endif() -list(APPEND PROJECT_LIBS PsfCore) +list(APPEND PSF_UI_IOS_PROJECT_LIBS PsfCore) if(NOT TARGET sh_openal) add_subdirectory( @@ -24,7 +24,7 @@ if(NOT TARGET sh_openal) ${CMAKE_CURRENT_BINARY_DIR}/SH_OpenAL ) endif() -list(APPEND PROJECT_LIBS sh_openal) +list(APPEND PSF_UI_IOS_PROJECT_LIBS sh_openal) find_library(UIKIT_LIBRARY NAMES UIKit) find_library(AVFOUNDATION_LIBRARY NAMES AVFoundation) @@ -68,7 +68,7 @@ target_link_libraries(PsfPlayer ${UIKIT_LIBRARY}) target_link_libraries(PsfPlayer ${AVFOUNDATION_LIBRARY}) target_link_libraries(PsfPlayer ${COREGRAPHICS_LIBRARY}) target_link_libraries(PsfPlayer ${MEDIAPLAYER_LIBRARY}) -target_link_libraries(PsfPlayer ${PROJECT_LIBS} "-ObjC") +target_link_libraries(PsfPlayer ${PSF_UI_IOS_PROJECT_LIBS} "-ObjC") # AOT stuff if(USE_AOT_CACHE) diff --git a/tools/PsfPlayer/Source/ui_js/CMakeLists.txt b/tools/PsfPlayer/Source/ui_js/CMakeLists.txt index c6550cb21..66e83313f 100644 --- a/tools/PsfPlayer/Source/ui_js/CMakeLists.txt +++ b/tools/PsfPlayer/Source/ui_js/CMakeLists.txt @@ -14,7 +14,7 @@ if(NOT TARGET PsfCore) ${CMAKE_CURRENT_BINARY_DIR}/PsfCore ) endif() -list(APPEND PROJECT_LIBS PsfCore) +list(APPEND PSF_UI_JS_PROJECT_LIBS PsfCore) if(NOT TARGET sh_openal) add_subdirectory( @@ -22,7 +22,7 @@ if(NOT TARGET sh_openal) ${CMAKE_CURRENT_BINARY_DIR}/SH_OpenAL ) endif() -list(APPEND PROJECT_LIBS sh_openal) +list(APPEND PSF_UI_JS_PROJECT_LIBS sh_openal) add_executable(PsfPlayer Main.cpp @@ -33,7 +33,7 @@ add_executable(PsfPlayer SH_OpenALProxy.cpp SH_OpenALProxy.h ) -target_link_libraries(PsfPlayer PUBLIC ${PROJECT_LIBS}) +target_link_libraries(PsfPlayer PUBLIC ${PSF_UI_JS_PROJECT_LIBS}) target_link_options(PsfPlayer PRIVATE "--bind") target_link_options(PsfPlayer PRIVATE "-sMODULARIZE=1") diff --git a/tools/PsfPlayer/Source/ui_win32/CMakeLists.txt b/tools/PsfPlayer/Source/ui_win32/CMakeLists.txt index 6d893d6df..4ae7dfadb 100644 --- a/tools/PsfPlayer/Source/ui_win32/CMakeLists.txt +++ b/tools/PsfPlayer/Source/ui_win32/CMakeLists.txt @@ -14,7 +14,7 @@ if(NOT TARGET PsfCore) ${CMAKE_CURRENT_BINARY_DIR}/PsfCore ) endif() -list(APPEND PROJECT_LIBS PsfCore) +list(APPEND PSF_UI_WIN32_PROJECT_LIBS PsfCore) if(NOT TARGET Framework_Win32) add_subdirectory( @@ -22,7 +22,7 @@ if(NOT TARGET Framework_Win32) ${CMAKE_CURRENT_BINARY_DIR}/Framework_Win32 ) endif() -list(APPEND PROJECT_LIBS Framework_Win32) +list(APPEND PSF_UI_WIN32_PROJECT_LIBS Framework_Win32) if(NOT TARGET tdemu) add_subdirectory( @@ -30,11 +30,11 @@ if(NOT TARGET tdemu) ${CMAKE_CURRENT_BINARY_DIR}/tdemu-1.10 ) endif() -list(APPEND PROJECT_LIBS tdemu) +list(APPEND PSF_UI_WIN32_PROJECT_LIBS tdemu) find_package(DirectX9 REQUIRED) -list(APPEND PROJECT_LIBS ${DirectX_D3D9_LIBRARY}) -list(APPEND PROJECT_LIBS ${DirectX_D3DX9_LIBRARY}) +list(APPEND PSF_UI_WIN32_PROJECT_LIBS ${DirectX_D3D9_LIBRARY}) +list(APPEND PSF_UI_WIN32_PROJECT_LIBS ${DirectX_D3DX9_LIBRARY}) include_directories(${DirectX_D3D9_INCLUDE_DIR} ${DirectX_D3DX9_INCLUDE_DIR}) set(AUDIO_LIBS) @@ -46,7 +46,7 @@ if(OPENAL_FOUND) ${CMAKE_CURRENT_BINARY_DIR}/FrameworkOpenAl ) endif() - list(APPEND PROJECT_LIBS Framework_OpenAl) + list(APPEND PSF_UI_WIN32_PROJECT_LIBS Framework_OpenAl) add_library(SH_OpenAL SHARED ../SH_OpenAL.cpp SH_OpenAL/DllMain.cpp) target_link_libraries(SH_OpenAL PRIVATE Framework_OpenAl Framework) list(APPEND AUDIO_LIBS SH_OpenAL) @@ -102,7 +102,7 @@ set(WIN32_SRC ) add_executable(PsfPlayer WIN32 ${WIN32_SRC} ${DEBUG_SRC} Res.rc) -target_link_libraries(PsfPlayer PUBLIC d3d9 uxtheme ${PROJECT_LIBS} ${AUDIO_LIBS}) +target_link_libraries(PsfPlayer PUBLIC d3d9 uxtheme ${PSF_UI_WIN32_PROJECT_LIBS} ${AUDIO_LIBS}) target_include_directories(PsfPlayer PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/DebugSupport) include(PrecompiledHeader)