Switch library to static and improve CMake integration

This commit is contained in:
Loic Guegan 2023-05-02 19:03:56 +02:00
parent 7125292878
commit 0e154098a5

View file

@ -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