-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
43 lines (34 loc) · 1.29 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
CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )
PROJECT( CLYZER )
SET( CMAKE_COLOR_MAKEFILE ON )
SET( CMAKE_VERBOSE_MAKEFILE OFF )
SET( CMAKE_INCLUDE_CURRENT_DIR TRUE )
SET( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE )
SET( CMAKE_MODULE_PATH
${CMAKE_MODULE_PATH}
"${CMAKE_CURRENT_SOURCE_DIR}/cmake"
)
IF( NOT CMAKE_BUILD_TYPE )
SET( CMAKE_BUILD_TYPE MinSizeRel )
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2" )
ELSEIF (${CMAKE_BUILD_TYPE} MATCHES "Debug")
SET( CMAKE_BUILD_TYPE Debug )
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DDEBUG -O0 -g" )
ADD_DEFINITIONS( "-Wall" )
ENDIF( )
# Versioning.
SET( ${PROJECT_NAME}_MAJOR_VERSION 0 )
SET( ${PROJECT_NAME}_MINOR_VERSION 1 )
SET( ${PROJECT_NAME}_PATCH_LEVEL 0 )
# Dependencies.
FIND_PACKAGE( Qt5Core REQUIRED )
FIND_PACKAGE( Qt5Gui REQUIRED )
FIND_PACKAGE( Qt5Widgets REQUIRED )
SET(CMAKE_AUTOMOC ON) # Moc when necessary.
FIND_PACKAGE( GMP REQUIRED )
INCLUDE_DIRECTORIES( ${GMP_INCLUDE_DIR} )
ADD_SUBDIRECTORY( src )
MESSAGE( STATUS "--------------------------------------------------" )
MESSAGE( STATUS "BUILD = ${CMAKE_BUILD_TYPE}" )
MESSAGE( STATUS "VERSION = ${${PROJECT_NAME}_MAJOR_VERSION}.${${PROJECT_NAME}_MINOR_VERSION}.${${PROJECT_NAME}_PATCH_LEVEL}" )
MESSAGE( STATUS "--------------------------------------------------" )