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