Implemented variant actions.
[tagua/yd.git] / src / CMakeLists.txt
blobd4db3ef937280f8261b72fad341957e085cc27a8
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   
33   hlvariant/dummy/variant.cpp
34   
35   hlvariant/crazyhouse/variant.cpp
36   hlvariant/crazyhouse/piece.cpp
37   
38   hlvariant/minichess5/variant.cpp
39   
40   hlvariant/shogi/variant.cpp
41   hlvariant/shogi/piece.cpp
43   hlvariant/minishogi/variant.cpp
45   animationfactory.cpp
46   constrainedtext.cpp
47   movelist.cpp
48   infodisplay.cpp
49   engineinfo.cpp
50   premove.cpp
51   mainanimation.cpp
52   random.cpp
53   point.cpp
54   sprite.cpp
55   pref_movelist.cpp
56   option.cpp
57   graphicalsystem.cpp
58   agentgroup.cpp
59   graphicalgame.cpp
60   imageeffects.cpp
61   crash.cpp
62   flash.cpp
63   histlineedit.cpp
64   pathinfo.cpp
65   pref_theme.cpp
66   gameinfo.cpp
67   console.cpp
68   animation.cpp
69   pref_engines.cpp
70   clock.cpp
71   chesstable.cpp
72   index.cpp
73   mastersettings.cpp
74   location.cpp
75   hline.cpp
76   xboardengine.cpp
77   gnushogiengine.cpp
78   settings.cpp
79   positioninfo.cpp
80   engine.cpp
81   ui.cpp
82   movelist_widget.cpp
83   pref_preferences.cpp
84   poolinfo.cpp
85   pixmaploader.cpp
86   qconnect.cpp
87   pref_board.cpp
88   game.cpp
89   piecepool.cpp
90   movelist_textual.cpp
91   icsconnection.cpp
92   mainwindow.cpp
93   board.cpp
94   common.cpp
95   pgnparser.cpp
96   movement.cpp
97   connection.cpp
98   movelist_table.cpp
99   newgame.cpp
100   option_p.cpp
101   themeinfo.cpp
102   namedsprite.cpp
103   icsgamedata.cpp
104   turnpolicy.cpp
105   decoratedmove.cpp
106   variants.cpp
107   actioncollection.cpp
110 # remove spurious xpressive warnings
111 set_source_files_properties(icsconnection.cpp
112   PROPERTIES COMPILE_FLAGS -Wno-extra)
114 kde4_add_ui_files(tagua_SRC
115   ui/pref_highlight.ui
116   ui/newgamedialog.ui
117   ui/pref_engines.ui
118   ui/preferences.ui
119   ui/gametags.ui
120   ui/pref_movelist.ui
121   ui/quickconnect.ui
122   ui/pref_theme.ui
123   ui/pref_theme_page.ui
124   ui/pref_board.ui
127 include_directories(
128   ${KDE4_INCLUDES}
129   ${LUA_INCLUDE_DIRS}
130   ${Boost_INCLUDE_DIRS}
131   ${CMAKE_CURRENT_BINARY_DIR}
134 add_definitions(
135   ${LUA_CFLAGS}
138 if(NOT DEFINED COMPILER_HAVE_X86_MMX)
139   check_cxx_source_compiles(" int main() { __asm__(\"pxor %mm0, %mm0\") ; }" COMPILER_HAVE_X86_MMX)
140 endif(NOT DEFINED COMPILER_HAVE_X86_MMX)
142 if(NOT DEFINED COMPILER_HAVE_X86_SSE2)
143   check_cxx_source_compiles(" int main() { __asm__(\"xorpd %xmm0, %xmm0\"); }" COMPILER_HAVE_X86_SSE2)
144 endif(NOT DEFINED COMPILER_HAVE_X86_SSE2)
146 if(COMPILER_HAVE_X86_MMX)
147   list(APPEND tagua_SRC imageeffects_mmx.cpp)
148   set_source_files_properties(imageeffects_mmx.cpp PROPERTIES COMPILE_FLAGS -mmmx)
149   set_source_files_properties(imageeffects.cpp PROPERTIES COMPILE_FLAGS -DHAVE_X86_MMX)
150 endif(COMPILER_HAVE_X86_MMX)
152 if(COMPILER_HAVE_X86_SSE2)
153   list(APPEND tagua_SRC imageeffects_sse.cpp)
154   set_source_files_properties(imageeffects_sse.cpp PROPERTIES COMPILE_FLAGS -msse2)
155   set_source_files_properties(imageeffects.cpp PROPERTIES COMPILE_FLAGS -DHAVE_X86_SSE2)
156 endif(COMPILER_HAVE_X86_SSE2)
158 if(DEBUG_BUILD)
159   set(TAGUA_TARGET taguaprivate)
160   
161   kde4_add_library(taguaprivate SHARED ${tagua_SRC})
162   kde4_add_executable(tagua main.cpp)
163 else(DEBUG_BUILD)
164   set(TAGUA_TARGET tagua)
165   kde4_add_executable(tagua main.cpp ${tagua_SRC})
166 endif(DEBUG_BUILD)
169 link_directories(
170   ${LUA_LIBRARY_DIRS}
171   ${Boost_LIBRARY_DIRS}
172   ${CMAKE_BINARY_DIR}/lib
174 target_link_libraries(${TAGUA_TARGET}
175   ${LUA_LINK_FLAGS}
176   ${KDE4_KDEUI_LIBS}
177   ${KDE4_KIO_LIBS}
178   dl
179   kdegames
180 )  
181   
182 if(DEBUG_BUILD)
183   target_link_libraries(tagua taguaprivate)
184   install(TARGETS taguaprivate DESTINATION ${LIB_INSTALL_DIR})
185 endif(DEBUG_BUILD)
188 INSTALL(TARGETS tagua DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
189 install(FILES tagua.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
190 install(FILES taguaui.rc DESTINATION  ${DATA_INSTALL_DIR}/tagua)