-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
50 lines (39 loc) · 1.18 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
48
49
50
# Copyright 2021 The SimpleLogo Authors.
# Licensed under GPL-3.0-or-later
cmake_minimum_required(VERSION 3.12)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "")
# Define the project
project(
SimpleLogo
VERSION 0.9
DESCRIPTION "A simple Logo implementation in C++"
HOMEPAGE_URL "https://github.com/DarkoGNU"
LANGUAGES CXX
)
# Setup for Conan users
if (EXISTS ${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()
endif()
# Some properties
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
# Module path
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake/Modules)
# Unused for now
option(SELF_TEST "Enables testing code to be built" OFF)
# Set the C++ standard
set(CMAKE_CXX_STANDARD 17)
# Add subfolders
add_subdirectory(Interpreter)
add_subdirectory(Main)
# Other stuff
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)
if(SELF_TEST)
message(STATUS "Tests enabled")
include(CTest)
enable_testing()
endif()