ochess/CMakeLists.txt
2023-01-19 16:33:44 +01:00

44 lines
1.3 KiB
CMake

cmake_minimum_required(VERSION 3.10)
project(ochess VERSION 0.0.0)
# wxWidgets
find_package(wxWidgets COMPONENTS net gl core base adv aui propgrid REQUIRED)
include(${wxWidgets_USE_FILE})
# Ochess
include_directories(src)
file(GLOB_RECURSE CPP_FILES src/*.cpp)
configure_file(${CMAKE_SOURCE_DIR}/src/config.h.in ${CMAKE_BINARY_DIR}/config.h)
include_directories(${CMAKE_CURRENT_BINARY_DIR}) # Enable access to config.h
add_executable(ochess ${CPP_FILES})
target_link_libraries(ochess ${wxWidgets_LIBRARIES})
# chessarbiter
add_subdirectory(libs/chessarbiter)
target_link_libraries(ochess chessarbiter)
include_directories(${CHESSARBITER_INCLUDE_DIR})
# CGEditor
add_subdirectory(libs/cgeditor)
target_link_libraries(ochess cgeditor)
include_directories(${CGEDITOR_INCLUDE_DIR})
# pgnp
add_subdirectory(libs/pgnp)
target_link_libraries(ochess pgnp)
include_directories(${PGNP_INCLUDE_DIR})
#uciadapter
add_subdirectory(libs/uciadapter)
target_link_libraries(ochess uciadapter)
include_directories(${UCIADAPTER_INCLUDE_DIR})
# ChessMoveInterface
add_subdirectory(libs/chess-move-interface)
target_link_libraries(ochess ChessMoveInterface)
include_directories(${CMI_INCLUDE_DIR})
# Assets
add_custom_command(TARGET ochess PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_SOURCE_DIR}/tools/assets ${CMAKE_BINARY_DIR}/assets)