blob: 954e92f4068e726ed3a03e7bd5ea37e2af168694 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
cmake_minimum_required(VERSION 3.10)
project(uciadapter)
# Configure Process
SET(process src/ProcessLinux.cpp)
SET(COMPILE_PLATFORM UNIX)
if(WIN32)
SET(process src/ProcessWindows.cpp)
SET(COMPILE_PLATFORM WIN32)
endif()
add_library(uciadapter SHARED src/UCI.cpp ${process})
# Includes
set(UCIADAPTER_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/includes) # For conveniance
set(UCIADAPTER_INCLUDE_DIR ${UCIADAPTER_INCLUDE_DIR} PARENT_SCOPE) # To be used by other projects with add_subdirectory()
file(MAKE_DIRECTORY ${UCIADAPTER_INCLUDE_DIR})
configure_file(src/UCI.hpp.in ${UCIADAPTER_INCLUDE_DIR}/UCI.hpp)
configure_file(src/Process.hpp ${UCIADAPTER_INCLUDE_DIR} COPYONLY)
configure_file(src/ProcessLinux.hpp ${UCIADAPTER_INCLUDE_DIR} COPYONLY)
include_directories(${UCIADAPTER_INCLUDE_DIR})
# Tests
enable_testing()
add_subdirectory("tests/")
|