ochess/CMakeLists.txt
2022-02-23 18:11:55 +01:00

32 lines
924 B
CMake

cmake_minimum_required(VERSION 3.10)
project(ochess VERSION "0.0.0")
# wxWidgets
find_package(wxWidgets COMPONENTS net gl core base adv aui REQUIRED)
include(${wxWidgets_USE_FILE})
# Ochess
include_directories(src)
file(GLOB_RECURSE CPP_FILES src/*.cpp)
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})
# Assets
add_custom_command(TARGET ochess PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_SOURCE_DIR}/tools/assets ${CMAKE_BINARY_DIR}/assets)