Skip to content
Snippets Groups Projects
Commit 02908cf0 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Split logging and other utils into separate library

parent 40b92d88
No related branches found
No related tags found
No related merge requests found
......@@ -189,6 +189,8 @@ INCLUDE("cmake/clang-cpp-checks.cmake")
# Always include sources from top directory
INCLUDE_DIRECTORIES(src)
SET(CORRYVRECKAN_LIBRARIES ${CORRYVRECKAN_LIBRARIES} CorryvreckanUtilities)
# Build objects library
ADD_SUBDIRECTORY(src/objects)
SET(CORRYVRECKAN_LIBRARIES ${CORRYVRECKAN_LIBRARIES} CorryvreckanObjects)
......
# Include the dependencies
INCLUDE_DIRECTORIES(SYSTEM ${CORRYVRECKAN_DEPS_INCLUDE_DIRS})
# Create core library
ADD_LIBRARY(CorryvreckanUtilities SHARED
utils/log.cpp
utils/unit.cpp
utils/text.cpp
)
# Define compile-time library extension and add compiler flags
TARGET_COMPILE_DEFINITIONS(CorryvreckanUtilities PRIVATE SHARED_LIBRARY_SUFFIX="${CMAKE_SHARED_LIBRARY_SUFFIX}")
TARGET_COMPILE_OPTIONS(CorryvreckanUtilities PRIVATE ${CORRYVRECKAN_CXX_FLAGS})
# Link the DL libraries
TARGET_LINK_LIBRARIES(CorryvreckanUtilities ${CMAKE_DL_LIBS})
# Create standard install target
INSTALL(TARGETS CorryvreckanUtilities
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib)
# Create core library
ADD_LIBRARY(CorryvreckanCore SHARED
Corryvreckan.cpp
detector/Detector.cpp
detector/PixelDetector.cpp
detector/exceptions.cpp
utils/log.cpp
utils/unit.cpp
utils/text.cpp
clipboard/Clipboard.cpp
config/ConfigManager.cpp
config/ConfigReader.cpp
......
......@@ -57,7 +57,7 @@ ADD_LIBRARY(CorryvreckanObjects SHARED
# Link the standard dependencies
TARGET_INCLUDE_DIRECTORIES(CorryvreckanObjects INTERFACE ${GBL_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES(CorryvreckanObjects ${CORRYVRECKAN_DEPS_LIBRARIES})
TARGET_LINK_LIBRARIES(CorryvreckanObjects ${CORRYVRECKAN_LIBRARIES} ${CORRYVRECKAN_DEPS_LIBRARIES})
TARGET_COMPILE_OPTIONS(CorryvreckanObjects PRIVATE ${CORRYVRECKAN_CXX_FLAGS})
# Specify install for the messages
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment