-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
47 lines (36 loc) · 1.1 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
# CMake required version
cmake_minimum_required(VERSION 3.1)
# "Only interpret if() arguments as variables or keywords when unquoted."
cmake_policy(SET CMP0054 NEW)
# Set cmake build type
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING
"Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel."
FORCE)
endif(NOT CMAKE_BUILD_TYPE)
# Python required
find_package(PythonInterp)
if (NOT PythonInterp_FOUND)
message(FATAL_ERROR "No python interpreter found, please install python!")
endif()
# Set Cpp11
set (CMAKE_CXX_STANDARD 11)
# Set project title
project(samp-plugin-spdlog)
# Add this to prevent missmatches
add_definitions(-D_ITERATOR_DEBUG_LEVEL=0)
# Base path constants
set(SAMP_LOG_ROOT ${CMAKE_CURRENT_SOURCE_DIR})
set(SAMP_LOG_BIN_ROOT ${CMAKE_CURRENT_BINARY_DIR})
set(SAMP_LOG_BIN_OUT_DIR ${CMAKE_BINARY_DIR}/build)
# Externals
set(SAMP_LOG_EXTERNAL ${SAMP_LOG_ROOT}/external)
# Module
set(CMAKE_MODULE_PATH
${CMAKE_MODULE_PATH}
${SAMP_LOG_ROOT}/build/cmake
${SAMP_LOG_EXTERNAL}/sampcmake
)
include(SpdlogExternal)
# Add src
add_subdirectory(src)