-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
37 lines (28 loc) · 1.05 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
cmake_minimum_required(VERSION 3.10.2)
# Set version variables
set(version_major "0")
set(version_minor "0")
set(version_patch "1")
# Set project version
set(project_version "${version_major}.${version_minor}.${version_patch}")
# Set the project and description
project(ProjectName VERSION ${project_version} DESCRIPTION "Project Name" LANGUAGES CXX)
# Set custom cmake modules path
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
# Set output paths
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
# Use c++11 flag for all modules
add_definitions("-std=c++11")
# Conan setup for dependencies
include(${CMAKE_BINARY_DIR}/conan_paths.cmake)
# Add sources
add_subdirectory(src)
# Testing
# PN stands for project namespace, change accordingly
option(PN_BUILD_TESTS "Determines whether to build tests." ON)
if(PN_BUILD_TESTS)
enable_testing()
add_subdirectory(test)
endif(PN_BUILD_TESTS)