mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 10:07:59 +02:00
added _SLS to MD5 functions, added a separate lib for the md5 C code
This commit is contained in:
@ -10,8 +10,6 @@ set(SOURCES
|
||||
src/ZmqSocket.cpp
|
||||
src/UdpRxSocket.cpp
|
||||
src/sls_detector_exceptions.cpp
|
||||
# src/sls_detector_defs.cpp
|
||||
src/md5.c
|
||||
src/md5_helper.cpp
|
||||
)
|
||||
|
||||
@ -51,6 +49,20 @@ if(SLS_DEVEL_HEADERS)
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
# Library for md5 c code that we are using (and potentially other c code)
|
||||
# Maybe this should be broken out into it's own folder etc.
|
||||
add_library(md5sls STATIC
|
||||
src/md5.c
|
||||
)
|
||||
|
||||
target_include_directories(md5sls
|
||||
PUBLIC
|
||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
|
||||
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
|
||||
)
|
||||
|
||||
|
||||
# Create an object library to avoid building the library twice
|
||||
add_library(slsSupportObject OBJECT
|
||||
${SOURCES}
|
||||
@ -69,7 +81,8 @@ target_link_libraries(slsSupportObject
|
||||
libzmq
|
||||
rapidjson
|
||||
PRIVATE
|
||||
slsProjectWarnings
|
||||
slsProjectWarnings
|
||||
md5sls
|
||||
)
|
||||
|
||||
if (SLS_USE_TESTS)
|
||||
@ -107,6 +120,9 @@ if((CMAKE_BUILD_TYPE STREQUAL "Release") AND SLS_LTO_AVAILABLE)
|
||||
set_property(TARGET ${SUPPORT_LIBRARY_TARGETS} PROPERTY INTERPROCEDURAL_OPTIMIZATION True)
|
||||
endif()
|
||||
|
||||
|
||||
list(APPEND SUPPORT_LIBRARY_TARGETS md5sls)
|
||||
|
||||
install(TARGETS ${SUPPORT_LIBRARY_TARGETS}
|
||||
EXPORT "${TARGETS_EXPORT_NAME}"
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
|
Reference in New Issue
Block a user