Added pools to shogi game state.
[tagua/yd.git] / CMakeLists.txt
blob780aa48e0c3becd656af37e5880f1f8e489ce710
1 PROJECT(tagua)
2 CMAKE_MINIMUM_REQUIRED(VERSION 2.4.0)
3 set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
5 include(Tagua)
7 if (NOT CMAKE_BUILD_TYPE)
8   set(DEBUG_BUILD 0)
9 else (NOT CMAKE_BUILD_TYPE)
10   string(REGEX MATCH "debug" DEBUG_BUILD ${CMAKE_BUILD_TYPE})
11 endif (NOT CMAKE_BUILD_TYPE)
13 # boost
14 FIND_PACKAGE(Boost)
16 # lua
17 IF(SYSTEM_LUA) # use lua installed in the system
18   INCLUDE(UsePkgConfig)
20   IF(LUA_PKG)
21     PKGCONFIG(${LUA_PKG} LUA_INCLUDE_DIRS LUA_LIBRARY_DIRS LUA_LINK_FLAGS LUA_CFLAGS)
22   ELSE(LUA_PKG)
23     PKGCONFIG(lua5.1 LUA_INCLUDE_DIRS LUA_LIBRARY_DIRS LUA_LINK_FLAGS LUA_CFLAGS)
24     IF(NOT LUA_LINK_FLAGS)
25       PKGCONFIG(lua LUA_INCLUDE_DIRS LUA_LIBRARY_DIRS LUA_LINK_FLAGS LUA_CFLAGS)
26     ENDIF(NOT LUA_LINK_FLAGS)
27   ENDIF(LUA_PKG)
29   ADD_CUSTOM_TARGET(lua_library)
30 ELSE(SYSTEM_LUA) # use the embedded lua source
31   SET(LUA_BIN_DIR "${CMAKE_CURRENT_BINARY_DIR}/lua")
32   SET(LUA_INCLUDE_DIRS "${LUA_BIN_DIR}/include")
33   SET(LUA_LIBRARY_DIRS "${LUA_BIN_DIR}")
34   SET(LUA_LINK_FLAGS lua)
36   ADD_SUBDIRECTORY(lua)
37 ENDIF(SYSTEM_LUA)
39 ADD_DEFINITIONS(-fexceptions)
40 find_package(KDE4 REQUIRED)
41 include(KDE4Defaults)
43 set(CMAKE_CXX_FLAGS_DEBUGFULL "${CMAKE_C_FLAGS_DEBUGFULL} -DTAGUA_DEBUG")
44 add_definitions(-DQT_NO_KEYWORDS ${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
46 add_subdirectory(src)
47 add_subdirectory(data)
49 enable_testing()
50 add_subdirectory(tests EXCLUDE_FROM_ALL)