mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
prepare for update to fuzzylite 5.0
- use system version of fuzzylite if available - adapt include paths
This commit is contained in:
parent
77684a9435
commit
fab31642d9
@ -1,7 +1,20 @@
|
||||
project(AI)
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
|
||||
add_subdirectory(FuzzyLite)
|
||||
find_path(FUZZYLITE_INCLUDE_PATH NAMES fl/fuzzylite.h)
|
||||
find_library(FUZZYLITE_LIB NAMES fuzzylite PATH_SUFFIXES dynamic)
|
||||
mark_as_advanced(FUZZYLITE_INCLUDE_PATH FUZZYLITE_LIB)
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(FUZZYLITE FUZZYLITE_INCLUDE_PATH FUZZYLITE_LIB)
|
||||
if (FUZZYLITE_FOUND)
|
||||
set (FUZZYLITE_LIBRARIES ${FUZZYLITE_LIB})
|
||||
set (FUZZYLITE_INCLUDE_DIR ${FUZZYLITE_INCLUDE_PATH})
|
||||
endif()
|
||||
|
||||
if (NOT FUZZYLITE_FOUND)
|
||||
add_subdirectory(FuzzyLite/fuzzylite)
|
||||
endif()
|
||||
add_subdirectory(BattleAI)
|
||||
add_subdirectory(StupidAI)
|
||||
add_subdirectory(EmptyAI)
|
||||
|
@ -1,7 +1,11 @@
|
||||
project(VCAI)
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
|
||||
include_directories(${Boost_INCLUDE_DIRS} ${CMAKE_HOME_DIRECTORY} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_HOME_DIRECTORY}/lib ${CMAKE_HOME_DIRECTORY}/AI/FuzzyLite)
|
||||
if (FUZZYLITE_FOUND)
|
||||
include_directories(${Boost_INCLUDE_DIRS} ${CMAKE_HOME_DIRECTORY} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_HOME_DIRECTORY}/lib ${FUZZYLITE_INCLUDE_DIR})
|
||||
else()
|
||||
include_directories(${Boost_INCLUDE_DIRS} ${CMAKE_HOME_DIRECTORY} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_HOME_DIRECTORY}/lib ${CMAKE_HOME_DIRECTORY}/AI/FuzzyLite/fuzzylite)
|
||||
endif()
|
||||
|
||||
set(VCAI_SRCS
|
||||
StdInc.cpp
|
||||
@ -13,7 +17,11 @@ set(VCAI_SRCS
|
||||
)
|
||||
|
||||
add_library(VCAI SHARED ${VCAI_SRCS})
|
||||
target_link_libraries(VCAI FuzzyLite_lib vcmi)
|
||||
if (FUZZYLITE_FOUND)
|
||||
target_link_libraries(VCAI ${FUZZYLITE_LIBRARIES} vcmi)
|
||||
else()
|
||||
target_link_libraries(VCAI fl-static vcmi)
|
||||
endif()
|
||||
|
||||
set_target_properties(VCAI PROPERTIES ${PCH_PROPERTIES})
|
||||
cotire(VCAI)
|
||||
|
@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include "../FuzzyLite/FuzzyLite.h"
|
||||
#include "fl/Headers.h"
|
||||
#include "Goals.h"
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user