From fb3828999edcf8a1b5b3945b5c23f2c1d8d567fb Mon Sep 17 00:00:00 2001 From: Danyil Somin Date: Fri, 10 Feb 2023 01:47:35 +0200 Subject: [PATCH] Minor CMake improvements --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index fd5cddf..6696286 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,6 +17,11 @@ include_directories(${PGNP_INCLUDE_DIR}) # ChessMoveInterface add_subdirectory(libs/chess-move-interface) include_directories(${CMI_INCLUDE_DIR}) +target_link_libraries(pgnp PRIVATE ChessMoveInterface) + +# Add include directiries to target to be independent of ${PGNP_INCLUDE_DIR} and ${CMI_INCLUDE_DIR} +target_include_directories(pgnp PUBLIC ${CMI_INCLUDE_DIR}) +target_include_directories(pgnp PUBLIC ${PGNP_INCLUDE_DIR}) # Unit tests set(COMPILE_TESTS OFF CACHE BOOL "Should unit tests be compiled")