pcsx2/CMakeLists.txt

59 lines
1.6 KiB
CMake
Raw Normal View History

# Setting it to a range tells it that it supports the features on the newer
# versions as well, avoiding setting policies.
cmake_minimum_required(VERSION 3.12...3.24)
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
message(FATAL_ERROR "PCSX2 does not support in-tree builds. Please make a build directory that is not the PCSX2 source directory and generate your CMake project there using either `cmake -B build_directory` or by running cmake from the build directory.")
endif()
# Project Name
project(Pcsx2)
# Variable to check that people use the good file
set(TOP_CMAKE_WAS_SOURCED TRUE)
# set module path
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
# include some generic functions to ensure correctness of the env
include(Pcsx2Utils)
check_no_parenthesis_in_path()
detectOperatingSystem()
check_compiler_version("7.0" "7.0")
#-------------------------------------------------------------------------------
# Include specific module
2020-11-30 15:07:51 +00:00
# GNUInstallDirs must be done before BuildParameters
include(GNUInstallDirs)
# BuildParameters Must be done before SearchForStuff
include(BuildParameters)
include(SearchForStuff)
# Must be done after SearchForStuff
get_git_version_info()
write_svnrev_h()
# make common
2021-09-02 16:36:36 +00:00
add_subdirectory(common)
# make pcsx2
2021-04-17 20:30:03 +00:00
add_subdirectory(pcsx2)
2021-12-14 08:02:10 +00:00
if (QT_BUILD)
add_subdirectory(pcsx2-qt)
2022-05-12 16:07:09 +00:00
# Updater is Windows only for now.
if (WIN32)
add_subdirectory(updater)
endif()
2021-12-14 08:02:10 +00:00
endif()
# tests
if(ACTUALLY_ENABLE_TESTS)
2021-08-13 05:39:40 +00:00
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
add_subdirectory(3rdparty/gtest EXCLUDE_FROM_ALL)
add_subdirectory(tests/ctest)
endif()