1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-11-18 05:57:45 +00:00
re3/CMakeLists.txt

45 lines
1.2 KiB
CMake
Raw Normal View History

2020-10-31 22:14:28 +00:00
cmake_minimum_required(VERSION 3.8)
2020-12-19 00:21:04 +00:00
project(reVC C CXX)
2020-10-31 22:14:28 +00:00
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
if(WIN32)
2020-12-19 00:21:04 +00:00
set(REVC_AUDIOS "NULL" "OAL" "MSS")
2020-10-31 22:14:28 +00:00
else()
2020-12-19 00:21:04 +00:00
set(REVC_AUDIOS "NULL" "OAL")
2020-10-31 22:14:28 +00:00
endif()
2020-12-19 00:21:04 +00:00
set(REVC_AUDIO "OAL" CACHE STRING "Audio")
2020-10-31 22:14:28 +00:00
2020-12-19 00:21:04 +00:00
set_property(CACHE REVC_AUDIO PROPERTY STRINGS ${REVC_AUDIOS})
message(STATUS "REVC_AUDIO = ${REVC_AUDIO} (choices=${REVC_AUDIOS})")
set("REVC_AUDIO_${REVC_AUDIO}" ON)
if(NOT REVC_AUDIO IN_LIST REVC_AUDIOS)
message(FATAL_ERROR "Illegal REVC_AUDIO=${REVC_AUDIO}")
2020-10-31 22:14:28 +00:00
endif()
2020-12-19 00:21:04 +00:00
if(REVC_INSTALL)
2020-10-31 22:14:28 +00:00
include(GNUInstallDirs)
2020-12-19 00:21:04 +00:00
set(REVC_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}/reVC")
2020-10-31 22:14:28 +00:00
endif()
add_subdirectory("vendor/librw")
add_subdirectory(src)
2020-12-19 00:21:04 +00:00
if(REVC_INSTALL)
2020-10-31 22:14:28 +00:00
include(CMakePackageConfigHelpers)
2020-12-19 00:21:04 +00:00
configure_package_config_file(reVC-config.cmake.in reVC-config.cmake
2020-10-31 22:14:28 +00:00
INSTALL_DESTINATION "${CMAKE_INSTALL_PREFIX}"
)
install(
2020-12-19 00:21:04 +00:00
FILES "${CMAKE_CURRENT_BINARY_DIR}/reVC-config.cmake"
2020-10-31 22:14:28 +00:00
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
)
install(
2020-12-19 00:21:04 +00:00
EXPORT reVC-targets
2020-10-31 22:14:28 +00:00
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
)
include(CMakeCPack.cmake)
endif()