From 0e154098a5048165da6f0623c946bd9a4b3e5749 Mon Sep 17 00:00:00 2001 From: Loic Guegan <manzerbredes@mailbox.org> Date: Tue, 2 May 2023 19:03:56 +0200 Subject: [PATCH] Switch library to static and improve CMake integration --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 771f289..56d379a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,10 +15,10 @@ endforeach(FILE ${HEADER_FILES}) # Add target if not exists # This way ChessMoveInterface can be used in multiple submodules -include_directories(src) file(GLOB_RECURSE SRC_CPP_FILES src/*.cpp) if(NOT TARGET ChessMoveInterface) - add_library(ChessMoveInterface SHARED ${SRC_CPP_FILES}) + add_library(ChessMoveInterface STATIC ${SRC_CPP_FILES}) + target_include_directories(ChessMoveInterface PUBLIC src) endif() # Unit tests