summaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-08-16 09:09:39 +0200
committerSergeanur <s.anureev@yandex.ua>2021-08-16 09:09:39 +0200
commitd7e764d519a9b96969786a99494eba8c3af988b9 (patch)
tree811331933b6959a1071d452536c4eca7873621ac /src/CMakeLists.txt
parentMerge branch 'lcs' of github.com:GTAmodding/re3 into lcs (diff)
parentPS2 audio reflections (diff)
downloadre3-d7e764d519a9b96969786a99494eba8c3af988b9.tar
re3-d7e764d519a9b96969786a99494eba8c3af988b9.tar.gz
re3-d7e764d519a9b96969786a99494eba8c3af988b9.tar.bz2
re3-d7e764d519a9b96969786a99494eba8c3af988b9.tar.lz
re3-d7e764d519a9b96969786a99494eba8c3af988b9.tar.xz
re3-d7e764d519a9b96969786a99494eba8c3af988b9.tar.zst
re3-d7e764d519a9b96969786a99494eba8c3af988b9.zip
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9cce6641..4c3f111e 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)
@@ -122,13 +126,19 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
)
endif()
+if(NINTENDO_SWITCH)
+ set(${PROJECT}_C_CXX_EXTENSIONS ON)
+else()
+ set(${PROJECT}_C_CXX_EXTENSIONS OFF)
+endif()
+
set_target_properties(${EXECUTABLE}
PROPERTIES
C_STANDARD 11
- C_EXTENSIONS OFF
+ C_EXTENSIONS ${${PROJECT}_C_CXX_EXTENSIONS}
C_STANDARD_REQUIRED ON
CXX_STANDARD 11
- CXX_EXTENSIONS OFF
+ CXX_EXTENSIONS ${${PROJECT}_C_CXX_EXTENSIONS}
CXX_STANDARD_REQUIRED ON
)
@@ -142,3 +152,5 @@ if(${PROJECT}_INSTALL)
install(FILES $<TARGET_PDB_FILE:${EXECUTABLE}> DESTINATION "." OPTIONAL)
endif()
endif()
+
+reVC_platform_target(${EXECUTABLE} INSTALL)