Skip to content
Snippets Groups Projects
Commit 12e8dd86 authored by Loic Guegan's avatar Loic Guegan
Browse files

Switch to static library and improve CMake integration

parent e5e82057
Branches
No related tags found
No related merge requests found
Pipeline #854974147 passed
......@@ -9,7 +9,7 @@ if(WIN32)
SET(COMPILE_PLATFORM WIN32)
SET(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
endif()
add_library(uciadapter SHARED src/UCI.cpp ${process})
add_library(uciadapter STATIC src/UCI.cpp ${process})
# Includes
set(UCIADAPTER_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/includes) # For conveniance
......@@ -19,8 +19,12 @@ 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)
configure_file(src/ProcessWindows.hpp ${UCIADAPTER_INCLUDE_DIR} COPYONLY)
include_directories(${UCIADAPTER_INCLUDE_DIR})
target_include_directories(uciadapter PUBLIC ${UCIADAPTER_INCLUDE_DIR})
# Tests
enable_testing()
add_subdirectory("tests/")
\ No newline at end of file
# Unit tests
set(COMPILE_TESTS OFF CACHE BOOL "Should unit tests be compiled")
if(COMPILE_TESTS)
enable_testing()
add_subdirectory("tests/")
endif()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment