summaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
blob: 4b3575c5b4b1e31c4e7136803b236c67194a4a62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
cmake_minimum_required(VERSION 3.24)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_EXTENSIONS Yes)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
project(Starshatter)
enable_testing()
include(AddVersionFile)
include(GenerateEmulator)
include(GoogleTest)
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
	if(CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
		set(CMAKE_INSTALL_PREFIX "C:/Program Files (x86)/Starshatter" CACHE PATH "Prefix to install to" FORCE)
	else()
		set(CMAKE_INSTALL_PREFIX "/opt/starshatter" CACHE PATH "Prefix to install to" FORCE)
	endif()
endif()
if(MSVC)
	set(WINDOWSSDK_LIBPATH "C:/Program Files (x86)/Windows Kits/10/Lib/10.0.19041.0" CACHE FILEPATH "Path to a versioned lib directory of selected Windows SDK")
	set(WINDOWSSDK_PATH "C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0" CACHE FILEPATH "Path to a versioned include directory of selected Windows SDK")
endif()
add_subdirectory(ArchiveEx)
add_subdirectory(contrib)
add_subdirectory(data)
add_subdirectory(DefinitionEx)
add_subdirectory(FoundationEx)
add_subdirectory(InfoEx)
if(MSVC)
	add_subdirectory(Magic2)
endif()
add_subdirectory(NetEx)
add_subdirectory(Starserver)
add_subdirectory(StarsEx)
add_subdirectory(Starshatter)
add_version_file(version.txt version.txt.conf ALL)
install(
	FILES NOTICE COPYING
	COMPONENT Copyright
	DESTINATION ${CMAKE_INSTALL_PREFIX}
	)