-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
40 lines (30 loc) · 1.03 KB
/
Copy pathCMakeLists.txt
File metadata and controls
40 lines (30 loc) · 1.03 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
39
40
project(SDLTest CXX C)
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
# Set application to GUI type for Win32 and MacOS
if(WIN32)
set(GUI_TYPE WIN32)
endif(WIN32)
if(APPLE)
set(GUI_TYPE MACOSX_BUNDLE)
endif(APPLE)
# global variables
set(SDLTest_INCLUDE_DIR
${CMAKE_SOURCE_DIR}/include
)
set(SDLTest_TARGET_DIR
${CMAKE_BINARY_DIR}/target
)
set(SDLTest_LIB_DIR
${CMAKE_BINARY_DIR}/lib
)
set(APPLICATION_NAME ${PROJECT_NAME})
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
# disallow in-source build
include(MacroEnsureOutOfSourceBuild)
macro_ensure_out_of_source_build("${PROJECT_NAME} requires an out of source build. Please create a separate build directory and run 'cmake /path/to/${PROJECT_NAME} [options]' there.")
# Define output directories
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${SDLTest_TARGET_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${SDLTest_LIB_DIR})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${SDLTest_LIB_DIR})
add_subdirectory(src)