]> vaikene.ee Git - evaf/blob - CMakeLists.txt
Merge branch 'ScosTime' into qt5
[evaf] / CMakeLists.txt
1 project(eVaf)
2
3 cmake_minimum_required(VERSION 2.8.9)
4
5 if(COMMAND cmake_policy)
6 cmake_policy(SET CMP0003 NEW)
7 cmake_policy(SET CMP0020 NEW)
8 endif(COMMAND cmake_policy)
9
10 # Find Qt packages
11 find_package(Qt5Core REQUIRED)
12 find_package(Qt5Xml REQUIRED)
13 find_package(Qt5Widgets)
14 find_package(Qt5Sql)
15
16 # Include our own cmake modules
17 set(CMAKE_MODULE_PATH ${eVaf_SOURCE_DIR}/mk/cmake)
18
19 set(CMAKE_INCLUDE_CURRENT_DIR ON)
20
21 # Default to the Debug build type if none is specified
22 IF(NOT CMAKE_BUILD_TYPE)
23 SET(CMAKE_BUILD_TYPE Debug)
24 ENDIF(NOT CMAKE_BUILD_TYPE)
25
26 # Add QT_NO_DEBUG for Release builds
27 IF(CMAKE_BUILD_TYPE STREQUAL Release)
28 message(STATUS "Release build")
29 ADD_DEFINITIONS(-DQT_NO_DEBUG)
30 ELSE(CMAKE_BUILD_TYPE STREQUAL Release)
31 message(STATUS "Debug build")
32 ENDIF(CMAKE_BUILD_TYPE STREQUAL Release)
33
34 # Where common eVaf header files are located
35 set(eVaf_INCLUDE ${CMAKE_SOURCE_DIR}/src/libs ${CMAKE_SOURCE_DIR}/src/plugins)
36
37 # Include platform-specific rules
38 if(WIN32)
39 include(CMakeWin.txt)
40 else(WIN32)
41 if(UNIX)
42 include(CMakeLinux.txt)
43 endif(UNIX)
44 endif(WIN32)
45
46 # Output all the executables and libraries to the bin directory
47 set(EXECUTABLE_OUTPUT_PATH ${eVaf_BINARY_DIR}/bin)
48 set(LIBRARY_OUTPUT_PATH ${eVaf_BINARY_DIR}/bin)
49
50 # Uncomment if you want to see the commands that make runs
51 #set(CMAKE_VERBOSE_MAKEFILE ON)
52
53 # Include subdirectories
54 add_subdirectory(src)