File: CMakeLists.txt

package info (click to toggle)
tagua 1.0~alpha2-15
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 8,028 kB
  • ctags: 7,178
  • sloc: cpp: 26,149; ansic: 13,039; makefile: 182; ruby: 87; sh: 39
file content (55 lines) | stat: -rw-r--r-- 1,344 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
PROJECT(tagua)
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.0)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)

include(Tagua)

if (NOT CMAKE_BUILD_TYPE)
  set(DEBUG_BUILD 0)
else (NOT CMAKE_BUILD_TYPE)
  string(REGEX MATCH "debug" DEBUG_BUILD ${CMAKE_BUILD_TYPE})
endif (NOT CMAKE_BUILD_TYPE)

# boost
FIND_PACKAGE(Boost)

# lua
IF(SYSTEM_LUA) # use lua installed in the system
  INCLUDE(FindPkgConfig)

  # set LUA_LDFLAGS _CFLAGS _INCLUDE_DIRS _LIBRARY_DIRS
  IF(LUA_PKG)
    pkg_check_modules(LUA REQUIRED ${LUA_PKG})
  ELSE(LUA_PKG)
    pkg_check_modules(LUA lua5.1)
    IF(NOT LUA_FOUND)
      pkg_check_modules(LUA REQUIRED lua)
    ENDIF(NOT LUA_FOUND)
  ENDIF(LUA_PKG)

  ADD_CUSTOM_TARGET(lua_library)
ELSE(SYSTEM_LUA) # use the embedded lua source
  SET(LUA_BIN_DIR "${CMAKE_CURRENT_BINARY_DIR}/lua")
  SET(LUA_INCLUDE_DIRS "${LUA_BIN_DIR}/include")
  SET(LUA_LIBRARY_DIRS "${LUA_BIN_DIR}")
  SET(LUA_LDFLAGS lua)

  ADD_SUBDIRECTORY(lua)
ENDIF(SYSTEM_LUA)

ADD_DEFINITIONS(-fexceptions)
find_package(KDE4 REQUIRED)
include(KDE4Defaults)

# blitz
FIND_PACKAGE(Blitz REQUIRED)

set(CMAKE_CXX_FLAGS_DEBUGFULL "${CMAKE_C_FLAGS_DEBUGFULL} -DTAGUA_DEBUG")
add_definitions(-DQT_NO_KEYWORDS ${QT_DEFINITIONS} ${KDE4_DEFINITIONS})

add_subdirectory(src)
add_subdirectory(data)
add_subdirectory(translations)

enable_testing()
add_subdirectory(tests)