]> de.git.xonotic.org Git - xonotic/netradiant.git/blob - radiant/CMakeLists.txt
various: reindent classes
[xonotic/netradiant.git] / radiant / CMakeLists.txt
1 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}")
2
3 find_package(OpenGL REQUIRED)
4
5 string(SUBSTRING ${CMAKE_SHARED_MODULE_SUFFIX} 1 -1 _clibext)
6 add_definitions(-DCMAKE_SHARED_MODULE_SUFFIX="${_clibext}")
7 unset(_clibext)
8
9 set(RADIANTLIST
10     autosave.cpp autosave.h
11     brush.cpp brush.h
12     brush_primit.cpp brush_primit.h
13     brushmanip.cpp brushmanip.h
14     brushmodule.cpp brushmodule.h
15     brushnode.cpp brushnode.h
16     brushtokens.cpp brushtokens.h
17     brushxml.cpp brushxml.h
18     build.cpp build.h
19     camwindow.cpp camwindow.h
20     clippertool.cpp clippertool.h
21     commands.cpp commands.h
22     console.cpp console.h
23     csg.cpp csg.h
24     dialog.cpp dialog.h
25     eclass.cpp eclass.h
26     eclass_def.cpp eclass_def.h
27     eclass_doom3.cpp eclass_doom3.h
28     eclass_fgd.cpp eclass_fgd.h
29     eclass_xml.cpp eclass_xml.h
30     entity.cpp entity.h
31     entityinspector.cpp entityinspector.h
32     entitylist.cpp entitylist.h
33     environment.cpp environment.h
34     error.cpp error.h
35     feedback.cpp feedback.h
36     filetypes.cpp filetypes.h
37     filters.cpp filters.h
38     findtexturedialog.cpp findtexturedialog.h
39     glwidget.cpp glwidget.h
40     grid.cpp grid.h
41     groupdialog.cpp groupdialog.h
42     gtkdlgs.cpp gtkdlgs.h
43     gtkmisc.cpp gtkmisc.h
44     help.cpp help.h
45     image.cpp image.h
46     main.cpp main.h
47     mainframe.cpp mainframe.h
48     map.cpp map.h
49     mru.cpp mru.h
50     nullmodel.cpp nullmodel.h
51     parse.cpp parse.h
52     patch.cpp patch.h
53     patchdialog.cpp patchdialog.h
54     patchmanip.cpp patchmanip.h
55     patchmodule.cpp patchmodule.h
56     plugin.cpp plugin.h
57     pluginapi.cpp pluginapi.h
58     pluginmanager.cpp pluginmanager.h
59     pluginmenu.cpp pluginmenu.h
60     plugintoolbar.cpp plugintoolbar.h
61     points.cpp points.h
62     preferencedictionary.cpp preferencedictionary.h
63     preferences.cpp preferences.h
64     qe3.cpp qe3.h
65     qgl.cpp qgl.h
66     referencecache.cpp referencecache.h
67     renderer.cpp renderer.h
68     renderstate.cpp renderstate.h
69     resource.h
70     scenegraph.cpp scenegraph.h
71     select.cpp select.h
72     selection.cpp selection.h
73     server.cpp server.h
74     shaders.cpp shaders.h
75     sockets.cpp sockets.h
76     stacktrace.cpp stacktrace.h
77     surfacedialog.cpp surfacedialog.h
78     texmanip.cpp texmanip.h
79     textureentry.cpp textureentry.h
80     textures.cpp textures.h
81     texwindow.cpp texwindow.h
82     timer.cpp timer.h
83     treemodel.cpp treemodel.h
84     undo.cpp undo.h
85     url.cpp url.h
86     view.cpp view.h
87     watchbsp.cpp watchbsp.h
88     winding.cpp winding.h
89     windowobservers.cpp windowobservers.h
90     xmlstuff.cpp xmlstuff.h
91     xywindow.cpp xywindow.h
92 )
93
94 if (WIN32)
95     list(APPEND RADIANTLIST multimon.cpp multimon.h)
96 endif ()
97
98 radiant_tool(${RADIANT_BASENAME} WIN32 radiant.rc ${RADIANTLIST})
99 add_dependencies(${RADIANT_BASENAME} modules)
100 target_link_libraries(${RADIANT_BASENAME}
101     ${CMAKE_DL_LIBS}
102     ${LIBXML2_LIBRARIES}
103     ${OPENGL_gl_LIBRARY}
104     ${GTK${GTK_TARGET}_LIBRARIES}
105     ${GTKGL_LIBRARIES}
106     includes
107     cmdlib
108     container
109     ddslib
110     debugging
111     etclib
112     filematch
113     generic
114     l_net
115     math
116     mathlib
117     memory
118     modulesystem
119     os
120     picomodel
121     profile
122     script
123     signal
124     splines
125     stream
126     string
127     uilib
128     xmllib
129 )
130
131 if (X11_LIBRARIES)
132     target_link_libraries(${RADIANT_BASENAME} ${X11_LIBRARIES})
133 endif ()
134
135 # PIE executables were wrongly recognized as shared libraries on Linux
136 # because of a mistake in the mime-type library.
137 # Because of that it was not possible to launch such executables from
138 # the file browser.
139 #
140 # While the problem is fixed upstream, most distributions still ship
141 # with a faulty mime-type library and may do for a long time.
142 #
143 # See: https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/11
144 #
145 # It may produce such warning though at strip time:
146 #   warning: allocated section `.dynstr' not in segment
147 # and produce an unusable binary, better not strip when using this hack.
148 #
149 # This hack is only wanted when NetRadiant is not installed system-wide.
150 if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux"     AND NOT FHS_INSTALL)
151     target_link_libraries(${RADIANT_BASENAME} -no-pie)
152 endif()
153
154 copy_dlls(${RADIANT_BASENAME})