-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
27 lines (21 loc) · 835 Bytes
/
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
cmake_minimum_required(VERSION 3.1)
set(VERSION_MAJOR 0)
set(VERSION_MINOR 1)
set(VERSION_PATCH 1)
set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
project(libopz
VERSION ${VERSION}
LANGUAGES CXX )
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# The compiled library code is here
add_subdirectory(deps)
add_subdirectory(src)
target_compile_definitions(libopz PRIVATE LIBOPZ_VERSION_MAJOR=${VERSION_MAJOR})
target_compile_definitions(libopz PRIVATE LIBOPZ_VERSION_MINOR=${VERSION_MINOR})
target_compile_definitions(libopz PRIVATE LIBOPZ_VERSION_PATCH=${VERSION_PATCH})
# Only do these if this is the main project, and not if it is included through add_subdirectory
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
add_subdirectory(examples)
endif()