Thu, 06 Feb 2014 20:43:22 +0200
- migrated to CMake again
- added public domain updaterevision for git information
632
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
1 | ###################################################################### |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
2 | # CMake file for LDForge. |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
3 | # The original QMake file was created on Sat Sep 22 17:29:49 2012 |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
4 | ###################################################################### |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
5 | |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
6 | project (ldforge) |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
7 | add_subdirectory (updaterevision) |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
8 | cmake_minimum_required (VERSION 2.6) |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
9 | find_package (Qt4 REQUIRED) |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
10 | find_package (OpenGL REQUIRED) |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
11 | |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
12 | get_target_property (UPDATEREVISION_EXE updaterevision LOCATION) |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
13 | |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
14 | add_custom_target (revision_check ALL |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
15 | COMMAND ${UPDATEREVISION_EXE} src/GitInformation.h |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
16 | WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
17 | DEPENDS updaterevision) |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
18 | |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
19 | include_directories (${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR}) |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
20 | |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
21 | set (LDForgeSources |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
22 | src/AddObjectDialog.cc |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
23 | src/Colors.cc |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
24 | src/ColorSelector.cc |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
25 | src/Configuration.cc |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
26 | src/ConfigurationDialog.cc |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
27 | src/CrashCatcher.cc |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
28 | src/Dialogs.cc |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
29 | src/Documentation.cc |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
30 | src/Document.cc |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
31 | src/EditHistory.cc |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
32 | src/ExternalPrograms.cc |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
33 | src/GLRenderer.cc |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
34 | src/LDConfig.cc |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
35 | src/LDObject.cc |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
36 | src/Main.cc |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
37 | src/MainWindow.cc |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
38 | src/MessageLog.cc |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
39 | src/Misc.cc |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
40 | src/PartDownloader.cc |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
41 | src/Primitives.cc |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
42 | src/Types.cc |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
43 | src/Widgets.cc |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
44 | src/actions/MainActions.cc |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
45 | src/actions/EditActions.cc |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
46 | ) |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
47 | |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
48 | set (LDForgeHeaders |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
49 | src/PropertyMacro.h |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
50 | src/CrashCatcher.h |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
51 | src/Colors.h |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
52 | src/misc/DocumentPointer.h |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
53 | src/misc/InvokationDeferer.h |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
54 | src/misc/RingFinder.h |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
55 | src/Document.h |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
56 | src/AddObjectDialog.h |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
57 | src/LDConfig.h |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
58 | src/PartDownloader.h |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
59 | src/LDObject.h |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
60 | src/Primitives.h |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
61 | src/Misc.h |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
62 | src/MessageLog.h |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
63 | src/Dialogs.h |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
64 | src/Widgets.h |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
65 | src/Documentation.h |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
66 | src/Main.h |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
67 | src/Types.h |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
68 | src/ColorSelector.h |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
69 | src/ConfigurationDialog.h |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
70 | src/GLRenderer.h |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
71 | src/Configuration.h |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
72 | src/MainWindow.h |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
73 | src/EditHistory.h |
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 | |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
76 | set (LDForgeForms |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
77 | ui/about.ui |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
78 | ui/addhistoryline.ui |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
79 | ui/bombbox.ui |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
80 | ui/colorsel.ui |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
81 | ui/config.ui |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
82 | ui/coverer.ui |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
83 | ui/downloadfrom.ui |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
84 | ui/edger2.ui |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
85 | ui/editraw.ui |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
86 | ui/extprogpath.ui |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
87 | ui/flip.ui |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
88 | ui/intersector.ui |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
89 | ui/isecalc.ui |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
90 | ui/ldforge.ui |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
91 | ui/ldrawpath.ui |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
92 | ui/makeprim.ui |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
93 | ui/newpart.ui |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
94 | ui/openprogress.ui |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
95 | ui/overlay.ui |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
96 | ui/rectifier.ui |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
97 | ui/replcoords.ui |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
98 | ui/rotpoint.ui |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
99 | ui/ytruder.ui |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
100 | ) |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
101 | |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
102 | set (LDForgeResources ldforge.qrc) |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
103 | set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -W -Wall") |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
104 | set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lGLU") |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
105 | include_directories ("${PROJECT_BINARY_DIR}/src") |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
106 | include_directories ("${PROJECT_BINARY_DIR}/src/misc") |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
107 | |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
108 | if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
109 | set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DDEBUG") |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
110 | endif() |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
111 | |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
112 | qt4_wrap_cpp (LDForgeMOC ${LDForgeHeaders}) |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
113 | qt4_wrap_ui (LDForgeFormsHeaders ${LDForgeForms}) |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
114 | qt4_add_resources (LDForgeResourcesRCC ${LDForgeResources}) |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
115 | |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
116 | add_executable (ldforge |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
117 | ${LDForgeSources} |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
118 | ${LDForgeResourcesRCC} |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
119 | ${LDForgeFormsHeaders} |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
120 | ) |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
121 | |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
122 | target_link_libraries (ldforge |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
123 | ${QT_QTCORE_LIBRARY} |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
124 | ${QT_QTGUI_LIBRARY} |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
125 | ${QT_QTNETWORK_LIBRARY} |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
126 | ${QT_QTOPENGL_LIBRARY} |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
127 | ${OPENGL_LIBRARIES} |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
128 | ) |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
129 | |
63e6243b880c
- migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
130 | install (TARGETS ldforge RUNTIME DESTINATION bin) |