-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
38 lines (28 loc) · 1.25 KB
/
CMakeLists.txt
File metadata and controls
38 lines (28 loc) · 1.25 KB
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
# CMakeList.txt : CMake project for MazeEngine, include source and define
# project specific logic here.
#
cmake_minimum_required (VERSION 3.15)
# enable Hot Reload for MSVC compilers if supported.
if (POLICY CMP0141)
cmake_policy(SET CMP0141 NEW)
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<IF:$<AND:$<C_COMPILER_ID:MSVC>,$<CXX_COMPILER_ID:MSVC>>,$<$<CONFIG:Debug,RelWithDebInfo>:EditAndContinue>,$<$<CONFIG:Debug,RelWithDebInfo>:ProgramDatabase>>")
endif()
project ("MazeEngine")
# set default compile flags for GCC
if(CMAKE_COMPILER_IS_GNUCXX)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -std=c++14")
endif(CMAKE_COMPILER_IS_GNUCXX)
set (SourceDir "${PROJECT_SOURCE_DIR}/src/")
# set system architecture
set(OsArch 32)
if (CMAKE_SIZEOF_VOID_P EQUAL 8) # size of void pointer on x32 is 4, on x64 is 8
set(OsArch 64)
endif()
# set output dirs
set(OutputBinPath "${CMAKE_SOURCE_DIR}/bin/${CMAKE_SYSTEM_NAME}-x${OsArch}/${CMAKE_BUILD_TYPE}")
# set the location of dynamic libraries (SO/DLL)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${OutputBinPath}")
# set the location of the executable files
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${OutputBinPath}")
file (GLOB_RECURSE source_files "${SourceDir}/*.cpp")
add_executable (MazeEngine ${source_files})