CMake: mark modules as a dependency of radiant
[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 if (WIN32)
94     list(APPEND RADIANTLIST multimon.cpp multimon.h)
95 endif()
96
97 radiant_tool(radiant WIN32 radiant.rc ${RADIANTLIST})
98 add_dependencies(radiant modules)
99 target_link_libraries(radiant
100     ${CMAKE_DL_LIBS}
101     ${LIBXML2_LIBRARIES}
102     ${OPENGL_gl_LIBRARY}
103     ${${GTK_NS}_LIBRARIES}
104     ${GTKGL_LIBRARIES}
105     includes
106     cmdlib
107     container
108     ddslib
109     debugging
110     etclib
111     filematch
112     generic
113     l_net
114     math
115     mathlib
116     memory
117     modulesystem
118     os
119     picomodel
120     profile
121     script
122     signal
123     splines
124     stream
125     string
126     uilib
127     xmllib
128 )
129 if (X11_LIBRARIES)
130     target_link_libraries(radiant ${X11_LIBRARIES})
131 endif ()
132
133 copy_dlls(radiant)