CMakeLists.txt

Tue, 09 Sep 2014 02:42:21 +0300

author
Teemu Piippo <crimsondusk64@gmail.com>
date
Tue, 09 Sep 2014 02:42:21 +0300
changeset 894
120cf01d8831
parent 884
d820588bf4f1
child 922
81887a77baa0
child 926
e1ae2dbcae8e
child 946
9cbd658b63f9
permissions
-rw-r--r--

- merged selection optimization from experimental into default

632
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
1 ######################################################################
845
fec7023e91a7 - added a code generator to produce a configuration.inc which replaces the old, DIABOLIC configuration indexing mechanism
Teemu Piippo <crimsondusk64@gmail.com>
parents: 842
diff changeset
2 #
fec7023e91a7 - added a code generator to produce a configuration.inc which replaces the old, DIABOLIC configuration indexing mechanism
Teemu Piippo <crimsondusk64@gmail.com>
parents: 842
diff changeset
3 # CMake file for LDForge.
fec7023e91a7 - added a code generator to produce a configuration.inc which replaces the old, DIABOLIC configuration indexing mechanism
Teemu Piippo <crimsondusk64@gmail.com>
parents: 842
diff changeset
4 # The original QMake file was created on Sat Sep 22 17:29:49 2012
fec7023e91a7 - added a code generator to produce a configuration.inc which replaces the old, DIABOLIC configuration indexing mechanism
Teemu Piippo <crimsondusk64@gmail.com>
parents: 842
diff changeset
5 #
632
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
6 ######################################################################
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
7
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
8 project (ldforge)
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
9 add_subdirectory (updaterevision)
845
fec7023e91a7 - added a code generator to produce a configuration.inc which replaces the old, DIABOLIC configuration indexing mechanism
Teemu Piippo <crimsondusk64@gmail.com>
parents: 842
diff changeset
10 add_subdirectory (codegen)
632
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
11 cmake_minimum_required (VERSION 2.6)
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
12
801
f6abc9eb4217 - made transparent direct colors a compile-time opt-in since it appears to be non-standard
Santeri Piippo <crimsondusk64@gmail.com>
parents: 785
diff changeset
13 option (TRANSPARENT_DIRECT_COLORS "Enables non-standard transparent direct colors" OFF)
855
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
14 option (USE_QT5 "Use Qt5 instead of Qt4" OFF)
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
15
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
16 if (USE_QT5)
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
17 find_package (Qt5Widgets REQUIRED)
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
18 find_package (Qt5Core REQUIRED)
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
19 find_package (Qt5OpenGL REQUIRED)
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
20 find_package (Qt5Network REQUIRED)
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
21 set (CMAKE_AUTOMOC ON)
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
22 else()
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
23 find_package (Qt4 REQUIRED)
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
24 endif()
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
25
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
26 find_package (OpenGL REQUIRED)
801
f6abc9eb4217 - made transparent direct colors a compile-time opt-in since it appears to be non-standard
Santeri Piippo <crimsondusk64@gmail.com>
parents: 785
diff changeset
27
632
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
28 get_target_property (UPDATEREVISION_EXE updaterevision LOCATION)
845
fec7023e91a7 - added a code generator to produce a configuration.inc which replaces the old, DIABOLIC configuration indexing mechanism
Teemu Piippo <crimsondusk64@gmail.com>
parents: 842
diff changeset
29 get_target_property (CODEGEN_EXE codegen LOCATION)
632
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
30
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
31 add_custom_target (revision_check ALL
845
fec7023e91a7 - added a code generator to produce a configuration.inc which replaces the old, DIABOLIC configuration indexing mechanism
Teemu Piippo <crimsondusk64@gmail.com>
parents: 842
diff changeset
32 COMMAND ${UPDATEREVISION_EXE} ${CMAKE_SOURCE_DIR} hginfo.h
fec7023e91a7 - added a code generator to produce a configuration.inc which replaces the old, DIABOLIC configuration indexing mechanism
Teemu Piippo <crimsondusk64@gmail.com>
parents: 842
diff changeset
33 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
fec7023e91a7 - added a code generator to produce a configuration.inc which replaces the old, DIABOLIC configuration indexing mechanism
Teemu Piippo <crimsondusk64@gmail.com>
parents: 842
diff changeset
34 DEPENDS updaterevision)
632
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
35
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
36 include_directories (${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR})
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
37
661
577bc177a06f - renamed some cmake identifiers
Santeri Piippo <crimsondusk64@gmail.com>
parents: 660
diff changeset
38 set (LDFORGE_SOURCES
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
39 src/actions.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
40 src/actionsEdit.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
41 src/addObjectDialog.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
42 src/basics.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
43 src/colors.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
44 src/colorSelector.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
45 src/configuration.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
46 src/configDialog.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
47 src/crashCatcher.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
48 src/dialogs.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
49 src/documentation.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
50 src/editHistory.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
51 src/extPrograms.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
52 src/glRenderer.cc
706
d79083b9f74d Merge ../ldforge into gl
Santeri Piippo <crimsondusk64@gmail.com>
parents: 690 655
diff changeset
53 src/glCompiler.cc
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
54 src/ldConfig.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
55 src/ldDocument.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
56 src/ldObject.cc
869
7184f3bae695 - circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents: 855
diff changeset
57 src/ldObjectMath.cpp
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
58 src/main.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
59 src/mainWindow.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
60 src/messageLog.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
61 src/miscallenous.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
62 src/partDownloader.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
63 src/primitives.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
64 src/radioGroup.cc
842
e1c9010eb9e8 - moved ringFinder into root source directory, clearing the src/misc/ directory
Teemu Piippo <crimsondusk64@gmail.com>
parents: 841
diff changeset
65 src/ringFinder.cc
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
66 src/version.cc
830
a741a0b9df49 - updated filenames
Santeri Piippo <crimsondusk64@gmail.com>
parents: 825
diff changeset
67 src/editmodes/abstractEditMode.cc
a741a0b9df49 - updated filenames
Santeri Piippo <crimsondusk64@gmail.com>
parents: 825
diff changeset
68 src/editmodes/circleMode.cc
a741a0b9df49 - updated filenames
Santeri Piippo <crimsondusk64@gmail.com>
parents: 825
diff changeset
69 src/editmodes/drawMode.cc
876
f040f0fb3795 - renamed line loop to line path, updated changelog
Teemu Piippo <crimsondusk64@gmail.com>
parents: 874
diff changeset
70 src/editmodes/linePathMode.cpp
830
a741a0b9df49 - updated filenames
Santeri Piippo <crimsondusk64@gmail.com>
parents: 825
diff changeset
71 src/editmodes/magicWandMode.cc
841
1243abd47381 - split the rectangle ability out of the draw mode into its own edit mode
Teemu Piippo <crimsondusk64@gmail.com>
parents: 830
diff changeset
72 src/editmodes/rectangleMode.cc
830
a741a0b9df49 - updated filenames
Santeri Piippo <crimsondusk64@gmail.com>
parents: 825
diff changeset
73 src/editmodes/selectMode.cc
632
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
74 )
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
75
661
577bc177a06f - renamed some cmake identifiers
Santeri Piippo <crimsondusk64@gmail.com>
parents: 660
diff changeset
76 set (LDFORGE_HEADERS
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
77 src/macros.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
78 src/crashCatcher.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
79 src/colors.h
842
e1c9010eb9e8 - moved ringFinder into root source directory, clearing the src/misc/ directory
Teemu Piippo <crimsondusk64@gmail.com>
parents: 841
diff changeset
80 src/ringFinder.h
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
81 src/ldDocument.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
82 src/addObjectDialog.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
83 src/ldConfig.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
84 src/partDownloader.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
85 src/ldObject.h
869
7184f3bae695 - circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents: 855
diff changeset
86 src/ldObjectMath.h
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
87 src/primitives.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
88 src/miscallenous.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
89 src/messageLog.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
90 src/dialogs.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
91 src/radioGroup.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
92 src/documentation.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
93 src/main.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
94 src/basics.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
95 src/colorSelector.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
96 src/configDialog.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
97 src/glRenderer.h
706
d79083b9f74d Merge ../ldforge into gl
Santeri Piippo <crimsondusk64@gmail.com>
parents: 690 655
diff changeset
98 src/glCompiler.h
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
99 src/configuration.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
100 src/mainWindow.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
101 src/editHistory.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
102 src/format.h
830
a741a0b9df49 - updated filenames
Santeri Piippo <crimsondusk64@gmail.com>
parents: 825
diff changeset
103 src/editmodes/abstractEditMode.h
a741a0b9df49 - updated filenames
Santeri Piippo <crimsondusk64@gmail.com>
parents: 825
diff changeset
104 src/editmodes/circleMode.h
a741a0b9df49 - updated filenames
Santeri Piippo <crimsondusk64@gmail.com>
parents: 825
diff changeset
105 src/editmodes/drawMode.h
876
f040f0fb3795 - renamed line loop to line path, updated changelog
Teemu Piippo <crimsondusk64@gmail.com>
parents: 874
diff changeset
106 src/editmodes/linePathMode.h
830
a741a0b9df49 - updated filenames
Santeri Piippo <crimsondusk64@gmail.com>
parents: 825
diff changeset
107 src/editmodes/magicWandMode.h
841
1243abd47381 - split the rectangle ability out of the draw mode into its own edit mode
Teemu Piippo <crimsondusk64@gmail.com>
parents: 830
diff changeset
108 src/editmodes/rectangleMode.h
830
a741a0b9df49 - updated filenames
Santeri Piippo <crimsondusk64@gmail.com>
parents: 825
diff changeset
109 src/editmodes/selectMode.h
632
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
110 )
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
111
661
577bc177a06f - renamed some cmake identifiers
Santeri Piippo <crimsondusk64@gmail.com>
parents: 660
diff changeset
112 set (LDFORGE_FORMS
632
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
113 ui/about.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
114 ui/addhistoryline.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
115 ui/bombbox.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
116 ui/colorsel.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
117 ui/config.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
118 ui/coverer.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
119 ui/downloadfrom.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
120 ui/edger2.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
121 ui/editraw.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
122 ui/extprogpath.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
123 ui/flip.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
124 ui/intersector.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
125 ui/isecalc.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
126 ui/ldforge.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
127 ui/ldrawpath.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
128 ui/makeprim.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
129 ui/newpart.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
130 ui/openprogress.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
131 ui/overlay.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
132 ui/rectifier.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
133 ui/replcoords.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
134 ui/rotpoint.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
135 ui/ytruder.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
136 )
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
137
845
fec7023e91a7 - added a code generator to produce a configuration.inc which replaces the old, DIABOLIC configuration indexing mechanism
Teemu Piippo <crimsondusk64@gmail.com>
parents: 842
diff changeset
138 add_custom_target (codegeneration ALL
fec7023e91a7 - added a code generator to produce a configuration.inc which replaces the old, DIABOLIC configuration indexing mechanism
Teemu Piippo <crimsondusk64@gmail.com>
parents: 842
diff changeset
139 COMMAND ${CODEGEN_EXE} ${LDFORGE_SOURCES} ${CMAKE_BINARY_DIR}/configuration.inc
fec7023e91a7 - added a code generator to produce a configuration.inc which replaces the old, DIABOLIC configuration indexing mechanism
Teemu Piippo <crimsondusk64@gmail.com>
parents: 842
diff changeset
140 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
fec7023e91a7 - added a code generator to produce a configuration.inc which replaces the old, DIABOLIC configuration indexing mechanism
Teemu Piippo <crimsondusk64@gmail.com>
parents: 842
diff changeset
141 DEPENDS codegen)
fec7023e91a7 - added a code generator to produce a configuration.inc which replaces the old, DIABOLIC configuration indexing mechanism
Teemu Piippo <crimsondusk64@gmail.com>
parents: 842
diff changeset
142
661
577bc177a06f - renamed some cmake identifiers
Santeri Piippo <crimsondusk64@gmail.com>
parents: 660
diff changeset
143 set (LDFORGE_RESOURCES ldforge.qrc)
855
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
144 # set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lGLU")
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
145
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
146 if (NOT MSVC)
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
147 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -W -Wall")
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
148 endif()
660
bc589e352f5b - now compiles with clang
Santeri Piippo <crimsondusk64@gmail.com>
parents: 657
diff changeset
149
801
f6abc9eb4217 - made transparent direct colors a compile-time opt-in since it appears to be non-standard
Santeri Piippo <crimsondusk64@gmail.com>
parents: 785
diff changeset
150 if (TRANSPARENT_DIRECT_COLORS)
f6abc9eb4217 - made transparent direct colors a compile-time opt-in since it appears to be non-standard
Santeri Piippo <crimsondusk64@gmail.com>
parents: 785
diff changeset
151 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTRANSPARENT_DIRECT_COLORS")
f6abc9eb4217 - made transparent direct colors a compile-time opt-in since it appears to be non-standard
Santeri Piippo <crimsondusk64@gmail.com>
parents: 785
diff changeset
152 endif()
f6abc9eb4217 - made transparent direct colors a compile-time opt-in since it appears to be non-standard
Santeri Piippo <crimsondusk64@gmail.com>
parents: 785
diff changeset
153
660
bc589e352f5b - now compiles with clang
Santeri Piippo <crimsondusk64@gmail.com>
parents: 657
diff changeset
154 # With clang, we need to set -Wno-deprecated since Qt headers seem to use the
bc589e352f5b - now compiles with clang
Santeri Piippo <crimsondusk64@gmail.com>
parents: 657
diff changeset
155 # register keyword which clang doesn't seem to like. It also appears that Qt
bc589e352f5b - now compiles with clang
Santeri Piippo <crimsondusk64@gmail.com>
parents: 657
diff changeset
156 # doesn't set Q_COMPILER_INITIALIZER_LISTS when compiling with clang? What's
bc589e352f5b - now compiles with clang
Santeri Piippo <crimsondusk64@gmail.com>
parents: 657
diff changeset
157 # up with that?
bc589e352f5b - now compiles with clang
Santeri Piippo <crimsondusk64@gmail.com>
parents: 657
diff changeset
158 if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
bc589e352f5b - now compiles with clang
Santeri Piippo <crimsondusk64@gmail.com>
parents: 657
diff changeset
159 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated -DQ_COMPILER_INITIALIZER_LISTS")
bc589e352f5b - now compiles with clang
Santeri Piippo <crimsondusk64@gmail.com>
parents: 657
diff changeset
160 endif()
bc589e352f5b - now compiles with clang
Santeri Piippo <crimsondusk64@gmail.com>
parents: 657
diff changeset
161
633
34d18b9c2cab - fixed compilation
Santeri Piippo <crimsondusk64@gmail.com>
parents: 632
diff changeset
162 include_directories ("${PROJECT_BINARY_DIR}")
632
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
163 include_directories ("${PROJECT_BINARY_DIR}/src")
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
164 include_directories ("${PROJECT_BINARY_DIR}/src/misc")
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
165
855
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
166 if (NOT MSVC)
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
167 if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR "${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo")
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
168 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DDEBUG")
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
169 endif()
632
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
170 endif()
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
171
855
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
172 if (USE_QT5)
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
173 qt5_generate_moc (LDFORGE_MOC ${LDFORGE_HEADERS})
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
174 qt5_add_resources (LDFORGE_QRC ${LDFORGE_RESOURCES})
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
175 qt5_wrap_ui (LDFORGE_FORMS_HEADERS ${LDFORGE_FORMS})
884
d820588bf4f1 - fixed: missing WIN32 keyword in cmakelists caused the command prompt to show up when ldforge was executed
Teemu Piippo <crimsondusk64@gmail.com>
parents: 876
diff changeset
176 add_executable (ldforge WIN32 ${LDFORGE_SOURCES} ${LDFORGE_MOC}
d820588bf4f1 - fixed: missing WIN32 keyword in cmakelists caused the command prompt to show up when ldforge was executed
Teemu Piippo <crimsondusk64@gmail.com>
parents: 876
diff changeset
177 ${LDFORGE_QRC} ${LDFORGE_FORMS_HEADERS})
855
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
178 else()
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
179 qt4_wrap_cpp (LDFORGE_MOC ${LDFORGE_HEADERS})
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
180 qt4_wrap_ui (LDFORGE_FORMS_HEADERS ${LDFORGE_FORMS})
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
181 qt4_add_resources (LDFORGE_RCC ${LDFORGE_RESOURCES})
884
d820588bf4f1 - fixed: missing WIN32 keyword in cmakelists caused the command prompt to show up when ldforge was executed
Teemu Piippo <crimsondusk64@gmail.com>
parents: 876
diff changeset
182 add_executable (ldforge WIN32 ${LDFORGE_SOURCES} ${LDFORGE_RCC}
d820588bf4f1 - fixed: missing WIN32 keyword in cmakelists caused the command prompt to show up when ldforge was executed
Teemu Piippo <crimsondusk64@gmail.com>
parents: 876
diff changeset
183 ${LDFORGE_FORMS_HEADERS} ${LDFORGE_MOC})
855
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
184 endif()
632
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
185
855
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
186 if (USE_QT5)
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
187 target_link_libraries (ldforge Qt5::Widgets Qt5::Network Qt5::OpenGL ${OPENGL_LIBRARIES})
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
188 else()
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
189 target_link_libraries (ldforge
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
190 ${QT_QTCORE_LIBRARY}
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
191 ${QT_QTGUI_LIBRARY}
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
192 ${QT_QTNETWORK_LIBRARY}
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
193 ${QT_QTOPENGL_LIBRARY}
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
194 ${OPENGL_LIBRARIES}
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
195 )
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
196 endif()
632
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
197
845
fec7023e91a7 - added a code generator to produce a configuration.inc which replaces the old, DIABOLIC configuration indexing mechanism
Teemu Piippo <crimsondusk64@gmail.com>
parents: 842
diff changeset
198 add_dependencies (ldforge revision_check codegeneration)
632
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
199 install (TARGETS ldforge RUNTIME DESTINATION bin)

mercurial