ochess/CMakeLists.txt

40 lines
1.2 KiB
Text
Raw Normal View History

2022-02-23 18:11:55 +01:00
cmake_minimum_required(VERSION 3.10)
2023-01-02 12:43:46 +01:00
project(ochess VERSION 0.0.0)
2022-02-23 18:11:55 +01:00
# wxWidgets
2022-02-26 17:05:47 +01:00
find_package(wxWidgets COMPONENTS net gl core base adv aui propgrid 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-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)
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})
2022-02-26 15:37:03 +01:00
#uciadapter
add_subdirectory(libs/uciadapter)
target_link_libraries(ochess uciadapter)
include_directories(${UCIADAPTER_INCLUDE_DIR})
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)