CMakeLists.txt

Thu, 17 Apr 2014 20:48:31 +0300

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Thu, 17 Apr 2014 20:48:31 +0300
changeset 713
46377d340c23
parent 710
86a19bfc34de
child 714
b4a990f59a5e
permissions
-rw-r--r--

- more debug stuff....

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
657
5cfbf4dffebf - generate gitinfo.h in the build directory, not source directory. made ldforge depend on revision_check properly
Santeri Piippo <crimsondusk64@gmail.com>
parents: 655
diff changeset
15 COMMAND ${UPDATEREVISION_EXE} gitinfo.h
5cfbf4dffebf - generate gitinfo.h in the build directory, not source directory. made ldforge depend on revision_check properly
Santeri Piippo <crimsondusk64@gmail.com>
parents: 655
diff changeset
16 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
632
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
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
22 src/actions.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
23 src/actionsEdit.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
24 src/addObjectDialog.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
25 src/basics.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
26 src/colors.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
27 src/colorSelector.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
28 src/configuration.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
29 src/configDialog.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
30 src/crashCatcher.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
31 src/dialogs.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
32 src/documentation.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
33 src/editHistory.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
34 src/extPrograms.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
35 src/glRenderer.cc
706
d79083b9f74d Merge ../ldforge into gl
Santeri Piippo <crimsondusk64@gmail.com>
parents: 690 655
diff changeset
36 src/glCompiler.cc
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
37 src/ldConfig.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
38 src/ldDocument.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
39 src/ldObject.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
40 src/main.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
41 src/mainWindow.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
42 src/messageLog.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
43 src/miscallenous.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
44 src/partDownloader.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
45 src/primitives.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
46 src/radioGroup.cc
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
47 src/version.cc
632
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
48 )
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
49
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
50 set (LDForgeHeaders
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
51 src/macros.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
52 src/crashCatcher.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
53 src/colors.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
54 src/misc/documentPointer.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
55 src/misc/invokeLater.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
56 src/misc/ringFinder.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
57 src/ldDocument.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
58 src/addObjectDialog.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
59 src/ldConfig.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
60 src/partDownloader.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
61 src/ldObject.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
62 src/primitives.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
63 src/miscallenous.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
64 src/messageLog.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
65 src/dialogs.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
66 src/radioGroup.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
67 src/documentation.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
68 src/main.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
69 src/basics.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
70 src/colorSelector.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
71 src/configDialog.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
72 src/glRenderer.h
706
d79083b9f74d Merge ../ldforge into gl
Santeri Piippo <crimsondusk64@gmail.com>
parents: 690 655
diff changeset
73 src/glCompiler.h
655
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
74 src/configuration.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
75 src/mainWindow.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
76 src/editHistory.h
b376645315ab - renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents: 644
diff changeset
77 src/format.h
632
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
78 )
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
79
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
80 set (LDForgeForms
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
81 ui/about.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
82 ui/addhistoryline.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
83 ui/bombbox.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
84 ui/colorsel.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
85 ui/config.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
86 ui/coverer.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
87 ui/downloadfrom.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
88 ui/edger2.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
89 ui/editraw.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
90 ui/extprogpath.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
91 ui/flip.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
92 ui/intersector.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
93 ui/isecalc.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
94 ui/ldforge.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
95 ui/ldrawpath.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
96 ui/makeprim.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
97 ui/newpart.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
98 ui/openprogress.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
99 ui/overlay.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
100 ui/rectifier.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
101 ui/replcoords.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
102 ui/rotpoint.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
103 ui/ytruder.ui
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
104 )
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
105
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
106 set (LDForgeResources ldforge.qrc)
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
107 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
108 set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lGLU")
633
34d18b9c2cab - fixed compilation
Santeri Piippo <crimsondusk64@gmail.com>
parents: 632
diff changeset
109 include_directories ("${PROJECT_BINARY_DIR}")
632
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
110 include_directories ("${PROJECT_BINARY_DIR}/src")
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
111 include_directories ("${PROJECT_BINARY_DIR}/src/misc")
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
112
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
113 if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
114 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DDEBUG")
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
115 endif()
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
116
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
117 qt4_wrap_cpp (LDForgeMOC ${LDForgeHeaders})
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
118 qt4_wrap_ui (LDForgeFormsHeaders ${LDForgeForms})
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
119 qt4_add_resources (LDForgeResourcesRCC ${LDForgeResources})
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 add_executable (ldforge
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
122 ${LDForgeSources}
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
123 ${LDForgeResourcesRCC}
633
34d18b9c2cab - fixed compilation
Santeri Piippo <crimsondusk64@gmail.com>
parents: 632
diff changeset
124 ${LDForgeFormsHeaders}
34d18b9c2cab - fixed compilation
Santeri Piippo <crimsondusk64@gmail.com>
parents: 632
diff changeset
125 ${LDForgeMOC}
632
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
126 )
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
127
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
128 target_link_libraries (ldforge
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
129 ${QT_QTCORE_LIBRARY}
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
130 ${QT_QTGUI_LIBRARY}
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
131 ${QT_QTNETWORK_LIBRARY}
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
132 ${QT_QTOPENGL_LIBRARY}
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
133 ${OPENGL_LIBRARIES}
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
134 )
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
135
657
5cfbf4dffebf - generate gitinfo.h in the build directory, not source directory. made ldforge depend on revision_check properly
Santeri Piippo <crimsondusk64@gmail.com>
parents: 655
diff changeset
136 add_dependencies (ldforge revision_check)
632
63e6243b880c - migrated to CMake again
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
137 install (TARGETS ldforge RUNTIME DESTINATION bin)

mercurial