summaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorAnonymous Maarten <anonymous.maarten@gmail.com>2021-07-05 16:02:10 +0200
committerAdrian Graber <adrian@adriangraber.com>2021-07-13 00:50:49 +0200
commita247d533675a3ffa3b5f3722bef4d55e5a912d03 (patch)
tree39a342fab25075ebb02885b0a3d7c13d112901ce /src/CMakeLists.txt
parentReplace GTA_SWITCH macro and use GAMEPAD_MENU (diff)
downloadre3-a247d533675a3ffa3b5f3722bef4d55e5a912d03.tar
re3-a247d533675a3ffa3b5f3722bef4d55e5a912d03.tar.gz
re3-a247d533675a3ffa3b5f3722bef4d55e5a912d03.tar.bz2
re3-a247d533675a3ffa3b5f3722bef4d55e5a912d03.tar.lz
re3-a247d533675a3ffa3b5f3722bef4d55e5a912d03.tar.xz
re3-a247d533675a3ffa3b5f3722bef4d55e5a912d03.tar.zst
re3-a247d533675a3ffa3b5f3722bef4d55e5a912d03.zip
Diffstat (limited to '')
-rw-r--r--src/CMakeLists.txt16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 2989c145..4de36572 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -54,9 +54,13 @@ target_compile_definitions(${EXECUTABLE} PRIVATE USE_OUR_VERSIONING)
if(${PROJECT}_AUDIO STREQUAL "OAL")
find_package(OpenAL REQUIRED)
- target_include_directories(${EXECUTABLE} PRIVATE ${OPENAL_INCLUDE_DIR})
- target_link_libraries(${EXECUTABLE} PRIVATE ${OPENAL_LIBRARY})
- target_compile_definitions(${EXECUTABLE} PRIVATE ${OPENAL_DEFINITIONS})
+ if(TARGET OpenAL::OpenAL)
+ target_link_libraries(${EXECUTABLE} PRIVATE OpenAL::OpenAL)
+ else()
+ target_include_directories(${EXECUTABLE} PRIVATE ${OPENAL_INCLUDE_DIR})
+ target_link_libraries(${EXECUTABLE} PRIVATE ${OPENAL_LIBRARY})
+ target_compile_definitions(${EXECUTABLE} PRIVATE ${OPENAL_DEFINITIONS})
+ endif()
target_compile_definitions(${EXECUTABLE} PRIVATE AUDIO_OAL)
elseif(${PROJECT}_AUDIO STREQUAL "MSS")
find_package(MilesSDK REQUIRED)
@@ -126,6 +130,11 @@ else()
set(${PROJECT}_C_CXX_EXTENSIONS OFF)
endif()
+if(NOT (WINDOWS OR APPLE OR NINTENDO_SWITCH))
+ find_package(X11 REQUIRED)
+ target_link_libraries(${EXECUTABLE} PRIVATE X11::X11)
+endif()
+
set_target_properties(${EXECUTABLE}
PROPERTIES
C_STANDARD 11
@@ -151,7 +160,6 @@ endif()
if(NINTENDO_SWITCH)
# Needed for OpenAL-Soft
target_link_libraries(${EXECUTABLE} PRIVATE
- openal # HACK - something broke with latest cmake
SDL2
)