|
@@ -48,6 +48,7 @@ option(ENABLE_ERM "Enable compilation of ERM scripting module" OFF)
|
|
|
option(ENABLE_LUA "Enable compilation of LUA scripting module" OFF)
|
|
option(ENABLE_LUA "Enable compilation of LUA scripting module" OFF)
|
|
|
option(ENABLE_LAUNCHER "Enable compilation of launcher" ON)
|
|
option(ENABLE_LAUNCHER "Enable compilation of launcher" ON)
|
|
|
option(ENABLE_EDITOR "Enable compilation of map editor" ON)
|
|
option(ENABLE_EDITOR "Enable compilation of map editor" ON)
|
|
|
|
|
+option(ENABLE_NULLKILLER_AI "Enable compilation of Nullkiller AI library" ON)
|
|
|
if(APPLE_IOS)
|
|
if(APPLE_IOS)
|
|
|
set(BUNDLE_IDENTIFIER_PREFIX "" CACHE STRING "Bundle identifier prefix")
|
|
set(BUNDLE_IDENTIFIER_PREFIX "" CACHE STRING "Bundle identifier prefix")
|
|
|
set(APP_DISPLAY_NAME "VCMI" CACHE STRING "App name on the home screen")
|
|
set(APP_DISPLAY_NAME "VCMI" CACHE STRING "App name on the home screen")
|
|
@@ -323,7 +324,6 @@ find_package(SDL2_ttf REQUIRED)
|
|
|
if(TARGET SDL2_ttf::SDL2_ttf)
|
|
if(TARGET SDL2_ttf::SDL2_ttf)
|
|
|
add_library(SDL2::TTF ALIAS SDL2_ttf::SDL2_ttf)
|
|
add_library(SDL2::TTF ALIAS SDL2_ttf::SDL2_ttf)
|
|
|
endif()
|
|
endif()
|
|
|
-find_package(TBB REQUIRED)
|
|
|
|
|
|
|
|
|
|
if(ENABLE_LAUNCHER OR ENABLE_EDITOR)
|
|
if(ENABLE_LAUNCHER OR ENABLE_EDITOR)
|
|
|
# Widgets finds its own dependencies (QtGui and QtCore).
|
|
# Widgets finds its own dependencies (QtGui and QtCore).
|
|
@@ -331,6 +331,10 @@ if(ENABLE_LAUNCHER OR ENABLE_EDITOR)
|
|
|
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets Network)
|
|
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets Network)
|
|
|
endif()
|
|
endif()
|
|
|
|
|
|
|
|
|
|
+if(ENABLE_NULLKILLER_AI)
|
|
|
|
|
+ find_package(TBB REQUIRED)
|
|
|
|
|
+endif()
|
|
|
|
|
+
|
|
|
if(ENABLE_LUA)
|
|
if(ENABLE_LUA)
|
|
|
find_package(luajit)
|
|
find_package(luajit)
|
|
|
# MXE paths hardcoded for current dependencies pack - tried and could not make it work another way
|
|
# MXE paths hardcoded for current dependencies pack - tried and could not make it work another way
|
|
@@ -397,6 +401,11 @@ else()
|
|
|
set(BIN_DIR "." CACHE STRING "Where to install binaries")
|
|
set(BIN_DIR "." CACHE STRING "Where to install binaries")
|
|
|
set(LIB_DIR "." CACHE STRING "Where to install main library")
|
|
set(LIB_DIR "." CACHE STRING "Where to install main library")
|
|
|
set(DATA_DIR "." CACHE STRING "Where to install data files")
|
|
set(DATA_DIR "." CACHE STRING "Where to install data files")
|
|
|
|
|
+
|
|
|
|
|
+ # following constants only used for platforms using XDG (Linux, BSD, etc)
|
|
|
|
|
+ add_definitions(-DM_DATA_DIR="${DATA_DIR}")
|
|
|
|
|
+ add_definitions(-DM_BIN_DIR="${BIN_DIR}")
|
|
|
|
|
+ add_definitions(-DM_LIB_DIR="${LIB_DIR}")
|
|
|
else()
|
|
else()
|
|
|
if(NOT BIN_DIR)
|
|
if(NOT BIN_DIR)
|
|
|
set(BIN_DIR "bin" CACHE STRING "Where to install binaries")
|
|
set(BIN_DIR "bin" CACHE STRING "Where to install binaries")
|
|
@@ -407,12 +416,12 @@ else()
|
|
|
if(NOT DATA_DIR)
|
|
if(NOT DATA_DIR)
|
|
|
set(DATA_DIR "share/vcmi" CACHE STRING "Where to install data files")
|
|
set(DATA_DIR "share/vcmi" CACHE STRING "Where to install data files")
|
|
|
endif()
|
|
endif()
|
|
|
- endif()
|
|
|
|
|
|
|
|
|
|
- # following constants only used for platforms using XDG (Linux, BSD, etc)
|
|
|
|
|
- add_definitions(-DM_DATA_DIR="${CMAKE_INSTALL_PREFIX}/${DATA_DIR}")
|
|
|
|
|
- add_definitions(-DM_BIN_DIR="${CMAKE_INSTALL_PREFIX}/${BIN_DIR}")
|
|
|
|
|
- add_definitions(-DM_LIB_DIR="${CMAKE_INSTALL_PREFIX}/${LIB_DIR}")
|
|
|
|
|
|
|
+ # following constants only used for platforms using XDG (Linux, BSD, etc)
|
|
|
|
|
+ add_definitions(-DM_DATA_DIR="${CMAKE_INSTALL_PREFIX}/${DATA_DIR}")
|
|
|
|
|
+ add_definitions(-DM_BIN_DIR="${CMAKE_INSTALL_PREFIX}/${BIN_DIR}")
|
|
|
|
|
+ add_definitions(-DM_LIB_DIR="${CMAKE_INSTALL_PREFIX}/${LIB_DIR}")
|
|
|
|
|
+ endif()
|
|
|
endif()
|
|
endif()
|
|
|
|
|
|
|
|
# iOS has flat libs directory structure
|
|
# iOS has flat libs directory structure
|