Implement for shogi deserialization of the notation used for saving PGN
[tagua/yd.git] / CMakeLists.txt
blobe8bfc75085894a7e195bc2f353eaed539f51dd32
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 # blitz
44 FIND_PACKAGE(Blitz REQUIRED)
46 set(CMAKE_CXX_FLAGS_DEBUGFULL "${CMAKE_C_FLAGS_DEBUGFULL} -DTAGUA_DEBUG")
47 add_definitions(-DQT_NO_KEYWORDS ${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
49 add_subdirectory(src)
50 add_subdirectory(data)
51 add_subdirectory(translations)
53 enable_testing()
54 add_subdirectory(tests EXCLUDE_FROM_ALL)