-
Notifications
You must be signed in to change notification settings - Fork 15
/
CMakeLists.txt
executable file
·38 lines (30 loc) · 1.14 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
cmake_minimum_required(VERSION 3.16...3.26)
# Set the default build type to "Release"
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to 'Release' as none was specified.")
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
else()
message(STATUS "Build type is set to '${CMAKE_BUILD_TYPE}'.")
endif()
# Set 32-bit platform for Visual Studio generator
if(CMAKE_GENERATOR MATCHES "Visual Studio")
set(CMAKE_GENERATOR_PLATFORM Win32)
endif()
project(vanillafixes LANGUAGES C)
# Check for 32-bit environment
if(NOT CMAKE_SIZEOF_VOID_P EQUAL 4)
message(
FATAL_ERROR
"A 32-bit environment is required to compile VanillaFixes. Launch CMake with the x86 VS Native Tools command prompt."
)
endif()
option(BUILD_DLL "Build the DLL (VfPatcher.dll)" ON)
option(BUILD_LAUNCHER "Build the launcher (VanillaFixes.exe)" ON)
if(BUILD_DLL)
add_subdirectory(src/dll)
endif()
if(BUILD_LAUNCHER)
add_subdirectory(src/launcher)
endif()