1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-22 18:32:44 +01:00
openrw/CMakeLists.txt

47 lines
1.1 KiB
CMake
Raw Normal View History

cmake_minimum_required(VERSION 3.2.2)
2014-01-26 04:45:55 +01:00
project(OpenRW)
2013-06-30 01:05:04 +02:00
# Read the configuration arguments
include("${PROJECT_SOURCE_DIR}/cmake_options.cmake")
# Create a rw_interface TARGET that holds all compiler options
include("${PROJECT_SOURCE_DIR}/cmake_configure.cmake")
set(OpenGL_GL_PREFERENCE GLVND)
2016-05-21 10:30:51 +02:00
find_package(OpenGL REQUIRED)
2016-05-24 19:49:19 +02:00
find_package(OpenAL REQUIRED)
2016-05-21 10:30:51 +02:00
find_package(Bullet REQUIRED)
2016-05-29 01:44:31 +02:00
find_package(GLM REQUIRED)
2017-09-13 13:09:49 +02:00
find_package(FFmpeg REQUIRED)
find_package(SDL2 REQUIRED)
2016-05-21 10:30:51 +02:00
# Include git hash in source
include(GetGitRevisionDescription)
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
add_subdirectory(rwlib)
add_subdirectory(rwengine)
add_subdirectory(rwgame)
2017-10-26 00:53:28 +02:00
if(BUILD_VIEWER)
2017-10-26 00:59:47 +02:00
add_subdirectory(rwviewer)
2017-10-26 00:53:28 +02:00
endif()
if(BUILD_TESTS)
2017-10-26 06:35:22 +02:00
enable_testing()
2017-10-26 17:26:15 +02:00
include(CTest)
2017-10-26 00:59:47 +02:00
add_subdirectory(tests)
2017-10-26 00:53:28 +02:00
endif()
# Copy the license to the install directory
2017-10-26 00:53:28 +02:00
if(CMAKE_SYSTEM_NAME MATCHES "Linux|FreeBSD")
2017-10-26 00:59:47 +02:00
install(FILES COPYING
DESTINATION "${DOC_DIR}"
)
endif()
# Copy the license to the build directory (for CI)
2016-06-22 00:28:43 +02:00
file(COPY COPYING
DESTINATION "${PROJECT_BINARY_DIR}"
2017-10-26 00:59:47 +02:00
)