Added close button to the tab bar.
[tagua/yd.git] / src / CMakeLists.txt
blob027d114872ae102032abdb0b262804493bd94c81
1 set(tagua_SRC
2   controllers/editgame.cpp
3   controllers/abstract.cpp
4   controllers/editposition.cpp
5   controllers/entitytoken.cpp
7   loader/image.cpp
8   loader/theme.cpp
9   loader/context.cpp
11   luaapi/lfunclib.c
12   luaapi/options.cpp
13   luaapi/luahl.cpp
14   luaapi/genericwrapper.cpp
15   luaapi/loader.cpp
16   luaapi/imaging.cpp
17   luaapi/luavalue.cpp
19   entities/gameentity.cpp
20   entities/userentity.cpp
21   entities/examinationentity.cpp
22   entities/entity.cpp
23   entities/engineentity.cpp
24   entities/icsentity.cpp
25   
26   hlvariant/chess/variant.cpp
27   hlvariant/chess/san.cpp
28   hlvariant/chess/icsverbose.cpp
29   hlvariant/chess/move.cpp
30   hlvariant/chess/gamestate.cpp
31   hlvariant/chess/piece.cpp
32   hlvariant/chess/actions.cpp
33   
34   hlvariant/dummy/variant.cpp
35   
36   hlvariant/crazyhouse/variant.cpp
37   hlvariant/crazyhouse/piece.cpp
38   
39   hlvariant/minichess5/variant.cpp
40   
41   hlvariant/shogi/variant.cpp
42   hlvariant/shogi/piece.cpp
43   hlvariant/shogi/shogiactions.cpp
45   hlvariant/minishogi/variant.cpp
47   animationfactory.cpp
48   constrainedtext.cpp
49   movelist.cpp
50   infodisplay.cpp
51   engineinfo.cpp
52   premove.cpp
53   mainanimation.cpp
54   random.cpp
55   point.cpp
56   sprite.cpp
57   pref_movelist.cpp
58   option.cpp
59   graphicalsystem.cpp
60   agentgroup.cpp
61   graphicalgame.cpp
62   imageeffects.cpp
63   crash.cpp
64   flash.cpp
65   histlineedit.cpp
66   pathinfo.cpp
67   pref_theme.cpp
68   gameinfo.cpp
69   console.cpp
70   animation.cpp
71   pref_engines.cpp
72   clock.cpp
73   chesstable.cpp
74   index.cpp
75   mastersettings.cpp
76   location.cpp
77   hline.cpp
78   xboardengine.cpp
79   gnushogiengine.cpp
80   settings.cpp
81   positioninfo.cpp
82   engine.cpp
83   ui.cpp
84   movelist_widget.cpp
85   pref_preferences.cpp
86   poolinfo.cpp
87   pixmaploader.cpp
88   qconnect.cpp
89   pref_board.cpp
90   game.cpp
91   piecepool.cpp
92   movelist_textual.cpp
93   icsconnection.cpp
94   mainwindow.cpp
95   board.cpp
96   common.cpp
97   pgnparser.cpp
98   movement.cpp
99   connection.cpp
100   movelist_table.cpp
101   newgame.cpp
102   option_p.cpp
103   themeinfo.cpp
104   namedsprite.cpp
105   icsgamedata.cpp
106   turnpolicy.cpp
107   decoratedmove.cpp
108   variants.cpp
109   actioncollection.cpp
110   tabwidget.cpp
113 # remove spurious xpressive warnings
114 set_source_files_properties(icsconnection.cpp
115   PROPERTIES COMPILE_FLAGS -Wno-extra)
117 kde4_add_ui_files(tagua_SRC
118   ui/pref_highlight.ui
119   ui/newgamedialog.ui
120   ui/pref_engines.ui
121   ui/preferences.ui
122   ui/gametags.ui
123   ui/pref_movelist.ui
124   ui/quickconnect.ui
125   ui/pref_theme.ui
126   ui/pref_theme_page.ui
127   ui/pref_board.ui
130 include_directories(
131   ${KDE4_INCLUDES}
132   ${LUA_INCLUDE_DIRS}
133   ${Boost_INCLUDE_DIRS}
134   ${CMAKE_CURRENT_BINARY_DIR}
137 add_definitions(
138   ${LUA_CFLAGS}
141 if(NOT DEFINED COMPILER_HAVE_X86_MMX)
142   check_cxx_source_compiles(" int main() { __asm__(\"pxor %mm0, %mm0\") ; }" COMPILER_HAVE_X86_MMX)
143 endif(NOT DEFINED COMPILER_HAVE_X86_MMX)
145 if(NOT DEFINED COMPILER_HAVE_X86_SSE2)
146   check_cxx_source_compiles(" int main() { __asm__(\"xorpd %xmm0, %xmm0\"); }" COMPILER_HAVE_X86_SSE2)
147 endif(NOT DEFINED COMPILER_HAVE_X86_SSE2)
149 if(COMPILER_HAVE_X86_MMX)
150   list(APPEND tagua_SRC imageeffects_mmx.cpp)
151   set_source_files_properties(imageeffects_mmx.cpp PROPERTIES COMPILE_FLAGS -mmmx)
152   set_source_files_properties(imageeffects.cpp PROPERTIES COMPILE_FLAGS -DHAVE_X86_MMX)
153 endif(COMPILER_HAVE_X86_MMX)
155 if(COMPILER_HAVE_X86_SSE2)
156   list(APPEND tagua_SRC imageeffects_sse.cpp)
157   set_source_files_properties(imageeffects_sse.cpp PROPERTIES COMPILE_FLAGS -msse2)
158   set_source_files_properties(imageeffects.cpp PROPERTIES COMPILE_FLAGS -DHAVE_X86_SSE2)
159 endif(COMPILER_HAVE_X86_SSE2)
161 if(DEBUG_BUILD)
162   set(TAGUA_TARGET taguaprivate)
163   
164   kde4_add_library(taguaprivate SHARED ${tagua_SRC})
165   kde4_add_executable(tagua main.cpp)
166 else(DEBUG_BUILD)
167   set(TAGUA_TARGET tagua)
168   kde4_add_executable(tagua main.cpp ${tagua_SRC})
169 endif(DEBUG_BUILD)
172 link_directories(
173   ${LUA_LIBRARY_DIRS}
174   ${Boost_LIBRARY_DIRS}
175   ${CMAKE_BINARY_DIR}/lib
177 target_link_libraries(${TAGUA_TARGET}
178   ${LUA_LINK_FLAGS}
179   ${KDE4_KDEUI_LIBS}
180   ${KDE4_KIO_LIBS}
181   dl
182   kdegames
183 )  
184   
185 if(DEBUG_BUILD)
186   target_link_libraries(tagua taguaprivate)
187   install(TARGETS taguaprivate DESTINATION ${LIB_INSTALL_DIR})
188 endif(DEBUG_BUILD)
191 INSTALL(TARGETS tagua DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
192 install(FILES tagua.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
193 install(FILES taguaui.rc DESTINATION  ${DATA_INSTALL_DIR}/tagua)