ochess/CMakeLists.txt

46 lines
1.3 KiB
Text
Raw Normal View History

2022-02-23 18:11:55 +01:00
cmake_minimum_required(VERSION 3.10)
2023-06-07 09:24:25 +02:00
project(ochess VERSION 0.0.4)
2022-02-23 18:11:55 +01:00
2023-05-09 22:33:21 +02:00
# Configure CXX Standards
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
2022-02-23 18:11:55 +01:00
# wxWidgets
2023-02-01 21:15:11 +01:00
find_package(wxWidgets COMPONENTS net gl core base adv aui propgrid richtext REQUIRED)
2022-02-23 18:11:55 +01:00
include(${wxWidgets_USE_FILE})
# Ochess
include_directories(src)
file(GLOB_RECURSE CPP_FILES src/*.cpp)
2023-02-01 21:15:11 +01:00
string(TIMESTAMP BUILD_TIME "%Y-%m-%d %H:%M")
2023-01-02 12:43:46 +01:00
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
2022-02-23 18:11:55 +01:00
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)
2022-02-26 15:37:03 +01:00
#uciadapter
add_subdirectory(libs/uciadapter)
target_link_libraries(ochess uciadapter)
2023-01-19 16:33:44 +01:00
# ChessMoveInterface
add_subdirectory(libs/chess-move-interface)
target_link_libraries(ochess ChessMoveInterface)
2022-02-23 18:11:55 +01:00
# Assets
add_custom_command(TARGET ochess PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_SOURCE_DIR}/tools/assets ${CMAKE_BINARY_DIR}/assets)