CMakeLists.txt

Sun, 30 Aug 2015 04:41:54 +0300

author
Teemu Piippo <crimsondusk64@gmail.com>
date
Sun, 30 Aug 2015 04:41:54 +0300
changeset 959
737245eee433
parent 958
1dc890c73e01
child 962
a4b463a7ee82
permissions
-rw-r--r--

Remove the vertex object type

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)
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
9 add_subdirectory (codegen)
632
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
10 cmake_minimum_required (VERSION 2.6)
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
11
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
12 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
13 option (USE_QT5 "Use Qt5 instead of Qt4" OFF)
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
14
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
15 if (USE_QT5)
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
16 find_package (Qt5Widgets REQUIRED)
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
17 find_package (Qt5Core REQUIRED)
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
18 find_package (Qt5OpenGL REQUIRED)
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
19 find_package (Qt5Network REQUIRED)
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
20 set (CMAKE_AUTOMOC ON)
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
21 else()
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
22 find_package (Qt4 REQUIRED)
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
23 endif()
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
24
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
25 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
26
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
27 get_target_property (CODEGEN_EXE codegen LOCATION)
632
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
28
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
29 add_custom_target (revision_check ALL
948
3a91828475fd Replaced updaterevision with a python script, more renames, clang fixes
Teemu Piippo <crimsondusk64@gmail.com>
parents: 946
diff changeset
30 COMMAND python "${CMAKE_SOURCE_DIR}/updaterevision.py" hginfo.h
3a91828475fd Replaced updaterevision with a python script, more renames, clang fixes
Teemu Piippo <crimsondusk64@gmail.com>
parents: 946
diff changeset
31 WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
632
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
32
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
33 include_directories (${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR})
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
34
661
577bc177a06f - renamed some cmake identifiers
Santeri Piippo <crimsondusk64@gmail.com>
parents: 660
diff changeset
35 set (LDFORGE_SOURCES
952
f116b63c4844 Rename all .cc files to .cpp files.
Teemu Piippo <crimsondusk64@gmail.com>
parents: 950
diff changeset
36 src/actions.cpp
f116b63c4844 Rename all .cc files to .cpp files.
Teemu Piippo <crimsondusk64@gmail.com>
parents: 950
diff changeset
37 src/actionsEdit.cpp
f116b63c4844 Rename all .cc files to .cpp files.
Teemu Piippo <crimsondusk64@gmail.com>
parents: 950
diff changeset
38 src/addObjectDialog.cpp
f116b63c4844 Rename all .cc files to .cpp files.
Teemu Piippo <crimsondusk64@gmail.com>
parents: 950
diff changeset
39 src/basics.cpp
f116b63c4844 Rename all .cc files to .cpp files.
Teemu Piippo <crimsondusk64@gmail.com>
parents: 950
diff changeset
40 src/colors.cpp
f116b63c4844 Rename all .cc files to .cpp files.
Teemu Piippo <crimsondusk64@gmail.com>
parents: 950
diff changeset
41 src/configuration.cpp
f116b63c4844 Rename all .cc files to .cpp files.
Teemu Piippo <crimsondusk64@gmail.com>
parents: 950
diff changeset
42 src/configDialog.cpp
f116b63c4844 Rename all .cc files to .cpp files.
Teemu Piippo <crimsondusk64@gmail.com>
parents: 950
diff changeset
43 src/crashCatcher.cpp
f116b63c4844 Rename all .cc files to .cpp files.
Teemu Piippo <crimsondusk64@gmail.com>
parents: 950
diff changeset
44 src/dialogs.cpp
f116b63c4844 Rename all .cc files to .cpp files.
Teemu Piippo <crimsondusk64@gmail.com>
parents: 950
diff changeset
45 src/documentation.cpp
f116b63c4844 Rename all .cc files to .cpp files.
Teemu Piippo <crimsondusk64@gmail.com>
parents: 950
diff changeset
46 src/editHistory.cpp
f116b63c4844 Rename all .cc files to .cpp files.
Teemu Piippo <crimsondusk64@gmail.com>
parents: 950
diff changeset
47 src/extPrograms.cpp
f116b63c4844 Rename all .cc files to .cpp files.
Teemu Piippo <crimsondusk64@gmail.com>
parents: 950
diff changeset
48 src/glRenderer.cpp
f116b63c4844 Rename all .cc files to .cpp files.
Teemu Piippo <crimsondusk64@gmail.com>
parents: 950
diff changeset
49 src/glCompiler.cpp
f116b63c4844 Rename all .cc files to .cpp files.
Teemu Piippo <crimsondusk64@gmail.com>
parents: 950
diff changeset
50 src/ldDocument.cpp
f116b63c4844 Rename all .cc files to .cpp files.
Teemu Piippo <crimsondusk64@gmail.com>
parents: 950
diff changeset
51 src/ldObject.cpp
869
7184f3bae695 - circle tool is now able to rotate the partial circular primitives spawned
Teemu Piippo <crimsondusk64@gmail.com>
parents: 855
diff changeset
52 src/ldObjectMath.cpp
953
8349552ee5e9 Refactor LDrawPathDialog and LDPaths
Teemu Piippo <crimsondusk64@gmail.com>
parents: 952
diff changeset
53 src/ldpaths.cpp
952
f116b63c4844 Rename all .cc files to .cpp files.
Teemu Piippo <crimsondusk64@gmail.com>
parents: 950
diff changeset
54 src/main.cpp
f116b63c4844 Rename all .cc files to .cpp files.
Teemu Piippo <crimsondusk64@gmail.com>
parents: 950
diff changeset
55 src/mainWindow.cpp
f116b63c4844 Rename all .cc files to .cpp files.
Teemu Piippo <crimsondusk64@gmail.com>
parents: 950
diff changeset
56 src/messageLog.cpp
f116b63c4844 Rename all .cc files to .cpp files.
Teemu Piippo <crimsondusk64@gmail.com>
parents: 950
diff changeset
57 src/miscallenous.cpp
f116b63c4844 Rename all .cc files to .cpp files.
Teemu Piippo <crimsondusk64@gmail.com>
parents: 950
diff changeset
58 src/partDownloader.cpp
f116b63c4844 Rename all .cc files to .cpp files.
Teemu Piippo <crimsondusk64@gmail.com>
parents: 950
diff changeset
59 src/primitives.cpp
f116b63c4844 Rename all .cc files to .cpp files.
Teemu Piippo <crimsondusk64@gmail.com>
parents: 950
diff changeset
60 src/radioGroup.cpp
f116b63c4844 Rename all .cc files to .cpp files.
Teemu Piippo <crimsondusk64@gmail.com>
parents: 950
diff changeset
61 src/ringFinder.cpp
f116b63c4844 Rename all .cc files to .cpp files.
Teemu Piippo <crimsondusk64@gmail.com>
parents: 950
diff changeset
62 src/version.cpp
950
5df69eb50182 Move colorSelector.cc to dialogs/colorselector.cpp
Teemu Piippo <crimsondusk64@gmail.com>
parents: 948
diff changeset
63 src/dialogs/colorselector.cpp
953
8349552ee5e9 Refactor LDrawPathDialog and LDPaths
Teemu Piippo <crimsondusk64@gmail.com>
parents: 952
diff changeset
64 src/dialogs/ldrawpathdialog.cpp
954
7feaa1a3c438 Refactor the new part dialog into a new class
Teemu Piippo <crimsondusk64@gmail.com>
parents: 953
diff changeset
65 src/dialogs/newpartdialog.cpp
957
429c7ed3cc54 Refactor OpenProgressDialog out of dialogs.cpp
Teemu Piippo <crimsondusk64@gmail.com>
parents: 956
diff changeset
66 src/dialogs/openprogressdialog.cpp
952
f116b63c4844 Rename all .cc files to .cpp files.
Teemu Piippo <crimsondusk64@gmail.com>
parents: 950
diff changeset
67 src/editmodes/abstractEditMode.cpp
f116b63c4844 Rename all .cc files to .cpp files.
Teemu Piippo <crimsondusk64@gmail.com>
parents: 950
diff changeset
68 src/editmodes/circleMode.cpp
f116b63c4844 Rename all .cc files to .cpp files.
Teemu Piippo <crimsondusk64@gmail.com>
parents: 950
diff changeset
69 src/editmodes/drawMode.cpp
876
f040f0fb3795 - renamed line loop to line path, updated changelog
Teemu Piippo <crimsondusk64@gmail.com>
parents: 874
diff changeset
70 src/editmodes/linePathMode.cpp
952
f116b63c4844 Rename all .cc files to .cpp files.
Teemu Piippo <crimsondusk64@gmail.com>
parents: 950
diff changeset
71 src/editmodes/magicWandMode.cpp
f116b63c4844 Rename all .cc files to .cpp files.
Teemu Piippo <crimsondusk64@gmail.com>
parents: 950
diff changeset
72 src/editmodes/rectangleMode.cpp
f116b63c4844 Rename all .cc files to .cpp files.
Teemu Piippo <crimsondusk64@gmail.com>
parents: 950
diff changeset
73 src/editmodes/selectMode.cpp
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/partDownloader.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
84 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
85 src/ldObjectMath.h
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
86 src/primitives.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
87 src/miscallenous.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
88 src/messageLog.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
89 src/dialogs.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
90 src/radioGroup.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
91 src/documentation.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
92 src/main.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
93 src/basics.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
94 src/configDialog.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
95 src/glRenderer.h
706
d79083b9f74d Merge ../ldforge into gl
Santeri Piippo <crimsondusk64@gmail.com>
parents: 690 655
diff changeset
96 src/glCompiler.h
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
97 src/configuration.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
98 src/mainWindow.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
99 src/editHistory.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
100 src/format.h
953
8349552ee5e9 Refactor LDrawPathDialog and LDPaths
Teemu Piippo <crimsondusk64@gmail.com>
parents: 952
diff changeset
101 src/ldpaths.h
950
5df69eb50182 Move colorSelector.cc to dialogs/colorselector.cpp
Teemu Piippo <crimsondusk64@gmail.com>
parents: 948
diff changeset
102 src/dialogs/colorselector.h
953
8349552ee5e9 Refactor LDrawPathDialog and LDPaths
Teemu Piippo <crimsondusk64@gmail.com>
parents: 952
diff changeset
103 src/dialogs/ldrawpathdialog.h
954
7feaa1a3c438 Refactor the new part dialog into a new class
Teemu Piippo <crimsondusk64@gmail.com>
parents: 953
diff changeset
104 src/dialogs/newpartdialog.h
957
429c7ed3cc54 Refactor OpenProgressDialog out of dialogs.cpp
Teemu Piippo <crimsondusk64@gmail.com>
parents: 956
diff changeset
105 src/dialogs/openprogressdialog.h
830
a741a0b9df49 - updated filenames
Santeri Piippo <crimsondusk64@gmail.com>
parents: 825
diff changeset
106 src/editmodes/abstractEditMode.h
a741a0b9df49 - updated filenames
Santeri Piippo <crimsondusk64@gmail.com>
parents: 825
diff changeset
107 src/editmodes/circleMode.h
a741a0b9df49 - updated filenames
Santeri Piippo <crimsondusk64@gmail.com>
parents: 825
diff changeset
108 src/editmodes/drawMode.h
876
f040f0fb3795 - renamed line loop to line path, updated changelog
Teemu Piippo <crimsondusk64@gmail.com>
parents: 874
diff changeset
109 src/editmodes/linePathMode.h
830
a741a0b9df49 - updated filenames
Santeri Piippo <crimsondusk64@gmail.com>
parents: 825
diff changeset
110 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
111 src/editmodes/rectangleMode.h
830
a741a0b9df49 - updated filenames
Santeri Piippo <crimsondusk64@gmail.com>
parents: 825
diff changeset
112 src/editmodes/selectMode.h
632
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
113 )
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
114
661
577bc177a06f - renamed some cmake identifiers
Santeri Piippo <crimsondusk64@gmail.com>
parents: 660
diff changeset
115 set (LDFORGE_FORMS
632
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
116 ui/about.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
117 ui/addhistoryline.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
118 ui/config.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
119 ui/coverer.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
120 ui/downloadfrom.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
121 ui/edger2.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
122 ui/editraw.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
123 ui/extprogpath.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
124 ui/flip.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
125 ui/intersector.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
126 ui/isecalc.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
127 ui/ldforge.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/overlay.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
130 ui/rectifier.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
131 ui/replcoords.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
132 ui/rotpoint.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
133 ui/ytruder.ui
950
5df69eb50182 Move colorSelector.cc to dialogs/colorselector.cpp
Teemu Piippo <crimsondusk64@gmail.com>
parents: 948
diff changeset
134 src/dialogs/colorselector.ui
953
8349552ee5e9 Refactor LDrawPathDialog and LDPaths
Teemu Piippo <crimsondusk64@gmail.com>
parents: 952
diff changeset
135 src/dialogs/ldrawpathdialog.ui
954
7feaa1a3c438 Refactor the new part dialog into a new class
Teemu Piippo <crimsondusk64@gmail.com>
parents: 953
diff changeset
136 src/dialogs/newpartdialog.ui
957
429c7ed3cc54 Refactor OpenProgressDialog out of dialogs.cpp
Teemu Piippo <crimsondusk64@gmail.com>
parents: 956
diff changeset
137 src/dialogs/openprogressdialog.ui
632
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
138 )
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
139
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
140 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
141 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
142 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
143 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
144
661
577bc177a06f - renamed some cmake identifiers
Santeri Piippo <crimsondusk64@gmail.com>
parents: 660
diff changeset
145 set (LDFORGE_RESOURCES ldforge.qrc)
855
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
146 # 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
147
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
148 if (NOT MSVC)
956
2af18ba2665f Replace LDIterate function with LDObjectIterator class
Teemu Piippo <crimsondusk64@gmail.com>
parents: 954
diff changeset
149 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -W -Wall -Wno-maybe-uninitialized")
855
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
150 endif()
660
bc589e352f5b - now compiles with clang
Santeri Piippo <crimsondusk64@gmail.com>
parents: 657
diff changeset
151
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
152 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
153 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
154 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
155
660
bc589e352f5b - now compiles with clang
Santeri Piippo <crimsondusk64@gmail.com>
parents: 657
diff changeset
156 # 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
157 # 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
158 # 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
159 # up with that?
bc589e352f5b - now compiles with clang
Santeri Piippo <crimsondusk64@gmail.com>
parents: 657
diff changeset
160 if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
bc589e352f5b - now compiles with clang
Santeri Piippo <crimsondusk64@gmail.com>
parents: 657
diff changeset
161 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
162 endif()
bc589e352f5b - now compiles with clang
Santeri Piippo <crimsondusk64@gmail.com>
parents: 657
diff changeset
163
633
34d18b9c2cab - fixed compilation
Santeri Piippo <crimsondusk64@gmail.com>
parents: 632
diff changeset
164 include_directories ("${PROJECT_BINARY_DIR}")
632
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
165 include_directories ("${PROJECT_BINARY_DIR}/src")
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
166 include_directories ("${PROJECT_BINARY_DIR}/src/misc")
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
167
855
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
168 if (NOT MSVC)
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
169 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
170 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DDEBUG")
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
171 endif()
632
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
172 endif()
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
173
855
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
174 if (USE_QT5)
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
175 qt5_generate_moc (LDFORGE_MOC ${LDFORGE_HEADERS})
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
176 qt5_add_resources (LDFORGE_QRC ${LDFORGE_RESOURCES})
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
177 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
178 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
179 ${LDFORGE_QRC} ${LDFORGE_FORMS_HEADERS})
855
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
180 else()
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
181 qt4_wrap_cpp (LDFORGE_MOC ${LDFORGE_HEADERS})
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
182 qt4_wrap_ui (LDFORGE_FORMS_HEADERS ${LDFORGE_FORMS})
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
183 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
184 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
185 ${LDFORGE_FORMS_HEADERS} ${LDFORGE_MOC})
855
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
186 endif()
632
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
187
855
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
188 if (USE_QT5)
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
189 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
190 else()
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
191 target_link_libraries (ldforge
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
192 ${QT_QTCORE_LIBRARY}
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
193 ${QT_QTGUI_LIBRARY}
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
194 ${QT_QTNETWORK_LIBRARY}
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
195 ${QT_QTOPENGL_LIBRARY}
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
196 ${OPENGL_LIBRARIES}
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
197 )
e16f1587ef44 - fixed compilation on windows systems
Santeri Piippo <crimsondusk64@gmail.com>
parents: 845
diff changeset
198 endif()
632
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
199
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
200 add_dependencies (ldforge revision_check codegeneration)
632
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
201 install (TARGETS ldforge RUNTIME DESTINATION bin)

mercurial