forked from gta-reversed/gta-reversed
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
53 lines (40 loc) · 1.35 KB
/
CMakeLists.txt
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
40
41
42
43
44
45
46
47
48
49
50
51
52
cmake_minimum_required(VERSION 3.20 FATAL_ERROR)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if (MSVC)
set(CMAKE_GENERATOR_PLATFORM Win32)
endif()
if (MSVC_TOOLSET_VERSION)
message("-- MSVC_TOOLSET_VERSION: ${MSVC_TOOLSET_VERSION}")
endif()
project(GTASA C CXX)
if (MSVC)
add_compile_options("/bigobj")
add_compile_options("/utf-8")
endif()
option(BUILD_DOC "Build documentation" OFF)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
include(Documentation)
set(RE_PROJECT GTASA)
set(RE_PROJECT_LIB_NAME gta_reversed)
set(RE_PROJECT_APP_NAME gta_reversed_app)
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "" FORCE)
set_property(
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
PROPERTY VS_STARTUP_PROJECT ${RE_PROJECT_LIB_NAME}
)
# Put DLLs in root
set(CMAKE_INSTALL_BINDIR .)
# And other components in its own folder
set(CMAKE_INSTALL_LIBDIR ${RE_PROJECT_LIB_NAME}/lib)
set(CMAKE_INSTALL_INCLUDEDIR ${RE_PROJECT_LIB_NAME}/include)
add_subdirectory(libs/ EXCLUDE_FROM_ALL SYSTEM)
add_subdirectory(source)
function(create_source_group target)
get_property(sources TARGET ${target} PROPERTY SOURCES)
foreach (filename ${sources})
source_group("${path}" FILES ${filename})
endforeach ()
endfunction()
create_source_group(${RE_PROJECT_LIB_NAME})