CMakeLists.txt

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

mercurial