-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathCMakeLists.txt
94 lines (81 loc) · 2.28 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
## ---------------------------------------------------------------------
##
## Copyright (C) 2012 - 2016 by Martin Steigemann and Wolfgang Bangerth
##
## This file is part of the deal.II library.
##
## The deal.II library is free software; you can use it, redistribute
## it, and/or modify it under the terms of the GNU Lesser General
## Public License as published by the Free Software Foundation; either
## version 2.1 of the License, or (at your option) any later version.
## The full text of the license can be found in the file LICENSE at
## the top level of the deal.II distribution.
##
## ---------------------------------------------------------------------
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(parameter_gui)
IF("${DEAL_II_EXECUTABLE_RELDIR}" STREQUAL "")
SET(DEAL_II_EXECUTABLE_RELDIR "bin")
ENDIF()
FIND_PACKAGE(Qt5 QUIET COMPONENTS Core Gui Xml Widgets)
IF(${Qt5_FOUND})
ELSE()
FIND_PACKAGE(Qt4 REQUIRED QtCore QtGui QtXml)
INCLUDE(${QT_USE_FILE})
ENDIF()
MARK_AS_ADVANCED(QT_QMAKE_EXECUTABLE)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
IF(${Qt5_FOUND})
QT5_WRAP_CPP(SOURCE_MOC
browse_lineedit.h
info_message.h
settings_dialog.h
mainwindow.h
parameter_delegate.h
)
QT5_ADD_RESOURCES(SOURCE_RCC
application.qrc
)
ELSE()
QT4_WRAP_CPP(SOURCE_MOC
browse_lineedit.h
info_message.h
settings_dialog.h
mainwindow.h
parameter_delegate.h
)
QT4_ADD_RESOURCES(SOURCE_RCC
application.qrc
)
ENDIF()
ADD_EXECUTABLE(parameter_gui_exe
browse_lineedit.cpp
info_message.cpp
settings_dialog.cpp
main.cpp
mainwindow.cpp
parameter_delegate.cpp
xml_parameter_reader.cpp
xml_parameter_writer.cpp
prm_parameter_writer.cpp
${SOURCE_MOC}
${SOURCE_RCC}
)
SET_TARGET_PROPERTIES(parameter_gui_exe
PROPERTIES
OUTPUT_NAME parameter_gui
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${DEAL_II_EXECUTABLE_RELDIR}"
)
TARGET_LINK_LIBRARIES(parameter_gui_exe ${QT_LIBRARIES})
INSTALL(TARGETS parameter_gui_exe
RUNTIME DESTINATION ${DEAL_II_EXECUTABLE_RELDIR}
COMPONENT parameter_gui
)
EXPORT(TARGETS parameter_gui_exe
FILE
${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Targets.cmake
APPEND
)
IF(${Qt5_FOUND})
QT5_USE_MODULES(parameter_gui_exe Core Gui Xml Widgets)
ENDIF()