mirror of
https://gitlab.com/manzerbredes/ochess.git
synced 2025-04-05 01:26:29 +02:00
45 lines
1.3 KiB
CMake
45 lines
1.3 KiB
CMake
cmake_minimum_required(VERSION 3.10)
|
|
project(ochess VERSION 0.0.4)
|
|
|
|
# Configure CXX Standards
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
|
|
# wxWidgets
|
|
find_package(wxWidgets COMPONENTS net gl core base adv aui propgrid richtext REQUIRED)
|
|
include(${wxWidgets_USE_FILE})
|
|
|
|
# Ochess
|
|
include_directories(src)
|
|
file(GLOB_RECURSE CPP_FILES src/*.cpp)
|
|
string(TIMESTAMP BUILD_TIME "%Y-%m-%d %H:%M")
|
|
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)
|
|
|
|
# CGEditor
|
|
add_subdirectory(libs/cgeditor)
|
|
target_link_libraries(ochess cgeditor)
|
|
|
|
# pgnp
|
|
add_subdirectory(libs/pgnp)
|
|
target_link_libraries(ochess pgnp)
|
|
|
|
#uciadapter
|
|
add_subdirectory(libs/uciadapter)
|
|
target_link_libraries(ochess uciadapter)
|
|
|
|
# ChessMoveInterface
|
|
add_subdirectory(libs/chess-move-interface)
|
|
target_link_libraries(ochess ChessMoveInterface)
|
|
|
|
# Assets
|
|
add_custom_command(TARGET ochess PRE_BUILD
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
|
${CMAKE_SOURCE_DIR}/tools/assets ${CMAKE_BINARY_DIR}/assets)
|