pgnp/CMakeLists.txt

21 lines
742 B
Text
Raw Normal View History

2022-01-23 20:57:28 +01:00
cmake_minimum_required(VERSION 3.10)
project(pgnp)
# Shared library
add_library(pgnp SHARED src/PGN.cpp src/HalfMove.cpp src/LargeFileStream.cpp)
2022-01-23 20:57:28 +01:00
# Includes
set(PGNP_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/includes) # For conveniance
set(PGNP_INCLUDE_DIR ${PGNP_INCLUDE_DIR} PARENT_SCOPE) # To be used by other projects with add_subdirectory()
file(MAKE_DIRECTORY ${PGNP_INCLUDE_DIR})
2022-01-25 10:53:10 +01:00
configure_file(src/PGN.hpp ${PGNP_INCLUDE_DIR}/pgnp.hpp COPYONLY)
configure_file(src/HalfMove.hpp ${PGNP_INCLUDE_DIR} COPYONLY)
configure_file(src/LargeFileStream.hpp ${PGNP_INCLUDE_DIR} COPYONLY)
2022-01-26 20:50:24 +01:00
configure_file(src/Types.hpp ${PGNP_INCLUDE_DIR} COPYONLY)
2022-01-25 10:53:10 +01:00
2022-01-24 15:29:22 +01:00
include_directories(${PGNP_INCLUDE_DIR})
2022-01-23 20:57:28 +01:00
# Unit tests
enable_testing()
2022-01-23 20:57:28 +01:00
add_subdirectory(./tests)