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