-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathCMakeLists.txt
79 lines (57 loc) · 2.22 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
CMAKE_MINIMUM_REQUIRED(VERSION 2.5.0 FATAL_ERROR)
#SET(CMAKE_VERBOSE_MAKEFILE "ON" CACHE BOOLEAN "Make it more verbose!" FORCE)
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
SET (CMAKE_CONFIGURATION_TYPES "Release;Debug" CACHE STRING "" FORCE)
MARK_AS_ADVANCED(CMAKE_CONFIGURATION_TYPES)
SET(DEBUGGING_ON TRUE CACHE BOOLEAN "Turn on debugging?" FORCE)
MARK_AS_ADVANCED(DEBUGGING_ON)
PROJECT(datadraw)
# CMake include directory
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
SET(PACKAGE ${PROJECT_NAME})
SET(CMAKE_SKIP_BUILD_RPATH TRUE)
SET(CMAKE_CURRENT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/bin)
SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
SET(REAL_EXECUTABLE_OUTPUT_PATH ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR})
# On Visual Studio 2003+ MS deprecated C. This removes all 1.276E1265 security
# warnings
IF(MSVC AND NOT MSVC60)
ADD_DEFINITIONS(
-D_CRT_SECURE_NO_WARNINGS
-D_CRT_NONSTDC_NO_WARNINGS
-D_CRT_FAR_MAPPINGS_NO_DEPRECATE
-D_CRT_IS_WCTYPE_NO_DEPRECATE
-D_CRT_MANAGED_FP_NO_DEPRECATE
-D_CRT_NONSTDC_NO_DEPRECATE
-D_CRT_SECURE_NO_DEPRECATE
-D_CRT_SECURE_NO_DEPRECATE_GLOBALS
-D_CRT_SETERRORMODE_BEEP_SLEEP_NO_DEPRECATE
-D_CRT_TIME_FUNCTIONS_NO_DEPRECATE
-D_CRT_VCCLRIT_NO_DEPRECATE
-D_SCL_SECURE_NO_DEPRECATE
)
ENDIF(MSVC AND NOT MSVC60)
# Version data that need modification for each release.
INCLUDE(version)
# Prebuild datadraw!
SET(MAINBUILD TRUE)
INCLUDE(prebuilt)
IF(DEBUGGING_ON AND GCC)
SET(PARAMS "-Wall -W -Wno-unused-parameter -Wno-unused-function")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${PARAMS}" )
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${PARAMS}" )
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${PARAMS}" )
SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${PARAMS}" )
ENDIF(DEBUGGING_ON AND GCC)
# Build and continue
IF(MSVC)
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd /ZI" )
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD" )
ENDIF(MSVC)
#INCLUDE(packit)
add_subdirectory(util ${CMAKE_CURRENT_BINARY_DIR})
add_subdirectory(src)
add_subdirectory(dataview)
#ADD_SUBDIRECTORY(examples)