-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
41 lines (35 loc) · 1.4 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
cmake_minimum_required(VERSION 3.0.2)
project("LabelLib")
set(CMAKE_CXX_STANDARD 11)
if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++11")
if(BIT MATCHES "64")
add_definitions(-DMS_WIN64)
endif(BIT MATCHES "64")
endif(MSVC)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
set(default_build_type "Release")
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to '${default_build_type}' as none was specified.")
set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE
STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
"Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif()
find_package(Git QUIET)
set(GIT_VERSION_STRING "version-unknown")
if(GIT_FOUND)
include(GitDateVersion)
gitDateVersionString(GIT_VERSION_STRING)
message(STATUS "GIT version: ${GIT_VERSION_STRING}")
endif()
add_definitions("-DGIT_VERSION_STRING=\"${GIT_VERSION_STRING}\"")
enable_testing() # needed on top-level CMakeLists.txt
# Target doc definition
# The sub projects must all define a custom target but with different names to avoid
# conflicts.
# We define as well a function AddDocTarget in cmake/DoxygenTarget.cmake
add_custom_target(doc DEPENDS docFlexLabel)
# ADD_DEPENDENCIES(doc docFlexLabel)
add_subdirectory(FlexLabel)