mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 21:07:13 +02:00
Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor
This commit is contained in:
@ -11,11 +11,20 @@ option (USE_RECEIVER "Receiver" OFF)
|
|||||||
option (USE_GUI "GUI" OFF)
|
option (USE_GUI "GUI" OFF)
|
||||||
option (USE_TESTS "TESTS" ON)
|
option (USE_TESTS "TESTS" ON)
|
||||||
|
|
||||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.0)
|
#Testing for minimum version for compilers
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11 -Wno-misleading-indentation")
|
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||||
else ()
|
# clang does not support -Wno-misleading-indentation
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11 ")
|
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.2)
|
||||||
endif ()
|
message(FATAL_ERROR "Clang version must be at least 3.2!")
|
||||||
|
endif()
|
||||||
|
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||||
|
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
|
||||||
|
message(FATAL_ERROR "GCC version must be at least 4.8!")
|
||||||
|
endif()
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-misleading-indentation")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11 ")
|
||||||
|
|
||||||
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=thread")
|
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=thread")
|
||||||
set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=thread")
|
set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=thread")
|
||||||
@ -24,7 +33,6 @@ find_package(Qt4)
|
|||||||
find_package(Qwt 6)
|
find_package(Qwt 6)
|
||||||
find_package(CBF)
|
find_package(CBF)
|
||||||
find_package(Doxygen)
|
find_package(Doxygen)
|
||||||
# find_package(PNG REQUIRED)
|
|
||||||
|
|
||||||
if (USE_HDF5)
|
if (USE_HDF5)
|
||||||
find_package(HDF5 1.10 COMPONENTS CXX)
|
find_package(HDF5 1.10 COMPONENTS CXX)
|
||||||
@ -35,7 +43,6 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
|||||||
set(CMAKE_INSTALL_RPATH "$ORIGIN")
|
set(CMAKE_INSTALL_RPATH "$ORIGIN")
|
||||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
|
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
|
||||||
|
|
||||||
|
|
||||||
#zmq
|
#zmq
|
||||||
add_library(zmq STATIC IMPORTED GLOBAL)
|
add_library(zmq STATIC IMPORTED GLOBAL)
|
||||||
set(ZMQ_STATIC_ARCHIVE ${CMAKE_CURRENT_SOURCE_DIR}/slsSupportLib/include/libzmq.a)
|
set(ZMQ_STATIC_ARCHIVE ${CMAKE_CURRENT_SOURCE_DIR}/slsSupportLib/include/libzmq.a)
|
||||||
@ -43,7 +50,6 @@ set_target_properties(zmq PROPERTIES
|
|||||||
IMPORTED_LOCATION ${ZMQ_STATIC_ARCHIVE}
|
IMPORTED_LOCATION ${ZMQ_STATIC_ARCHIVE}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
if (USE_TEXTCLIENT)
|
if (USE_TEXTCLIENT)
|
||||||
add_subdirectory(slsDetectorSoftware)
|
add_subdirectory(slsDetectorSoftware)
|
||||||
endif (USE_TEXTCLIENT)
|
endif (USE_TEXTCLIENT)
|
||||||
@ -52,8 +58,7 @@ if (USE_RECEIVER)
|
|||||||
add_subdirectory(slsReceiverSoftware)
|
add_subdirectory(slsReceiverSoftware)
|
||||||
add_subdirectory(manual/manual-api)
|
add_subdirectory(manual/manual-api)
|
||||||
endif (USE_RECEIVER)
|
endif (USE_RECEIVER)
|
||||||
|
|
||||||
|
|
||||||
if (USE_GUI)
|
if (USE_GUI)
|
||||||
if (QT4_FOUND AND QWT_FOUND)
|
if (QT4_FOUND AND QWT_FOUND)
|
||||||
add_subdirectory(slsDetectorGui)
|
add_subdirectory(slsDetectorGui)
|
||||||
|
@ -4,28 +4,19 @@ set(SOURCES
|
|||||||
slsDetector/slsDetectorUsers.cpp
|
slsDetector/slsDetectorUsers.cpp
|
||||||
slsDetector/slsDetectorCommand.cpp
|
slsDetector/slsDetectorCommand.cpp
|
||||||
slsDetector/slsDetector.cpp
|
slsDetector/slsDetector.cpp
|
||||||
../slsSupportLib/include/ClientInterface.cpp
|
${PROJECT_SOURCE_DIR}/slsSupportLib/include/ClientInterface.cpp
|
||||||
../slsSupportLib/include/utilities.cpp
|
${PROJECT_SOURCE_DIR}/slsSupportLib/include/utilities.cpp
|
||||||
../slsSupportLib/src/string_utils.cpp
|
${PROJECT_SOURCE_DIR}/slsSupportLib/src/string_utils.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
set(HEADERS
|
set(HEADERS
|
||||||
)
|
)
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
../slsSupportLib/include
|
${PROJECT_SOURCE_DIR}/slsSupportLib/include
|
||||||
multiSlsDetector
|
multiSlsDetector
|
||||||
sharedMemory
|
sharedMemory
|
||||||
slsDetector
|
slsDetector
|
||||||
)
|
|
||||||
|
|
||||||
add_library(slsDetectorStatic STATIC
|
|
||||||
${SOURCES}
|
|
||||||
${HEADERS}
|
|
||||||
)
|
|
||||||
set_target_properties(slsDetectorStatic PROPERTIES
|
|
||||||
ARCHIVE_OUTPUT_NAME SlsDetector
|
|
||||||
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(slsDetectorShared SHARED
|
add_library(slsDetectorShared SHARED
|
||||||
@ -38,7 +29,6 @@ target_link_libraries(slsDetectorShared
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
set(PUBLICHEADERS
|
set(PUBLICHEADERS
|
||||||
${PROJECT_SOURCE_DIR}/slsSupportLib/include/sls_detector_defs.h
|
${PROJECT_SOURCE_DIR}/slsSupportLib/include/sls_detector_defs.h
|
||||||
${PROJECT_SOURCE_DIR}/slsSupportLib/include/sls_detector_funcs.h
|
${PROJECT_SOURCE_DIR}/slsSupportLib/include/sls_detector_funcs.h
|
||||||
@ -61,8 +51,6 @@ set_target_properties(slsDetectorShared PROPERTIES
|
|||||||
PUBLIC_HEADER "${PUBLICHEADERS}"
|
PUBLIC_HEADER "${PUBLICHEADERS}"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
add_subdirectory(slsDetectorClient)
|
add_subdirectory(slsDetectorClient)
|
||||||
|
|
||||||
if(DOXYGEN_FOUND)
|
if(DOXYGEN_FOUND)
|
||||||
@ -75,7 +63,8 @@ if(DOXYGEN_FOUND)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
install(TARGETS slsDetectorShared slsDetectorStatic
|
install(TARGETS slsDetectorShared
|
||||||
LIBRARY DESTINATION lib
|
LIBRARY DESTINATION lib
|
||||||
PUBLIC_HEADER DESTINATION include
|
PUBLIC_HEADER DESTINATION include
|
||||||
ARCHIVE DESTINATION lib)
|
ARCHIVE DESTINATION lib
|
||||||
|
)
|
||||||
|
@ -41,15 +41,6 @@ include_directories(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
add_library(slsReceiverStatic STATIC
|
|
||||||
${SOURCES}
|
|
||||||
${HEADERS}
|
|
||||||
)
|
|
||||||
set_target_properties(slsReceiverStatic PROPERTIES
|
|
||||||
ARCHIVE_OUTPUT_NAME SlsReceiver
|
|
||||||
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
|
||||||
)
|
|
||||||
|
|
||||||
add_library(slsReceiverShared SHARED
|
add_library(slsReceiverShared SHARED
|
||||||
${SOURCES}
|
${SOURCES}
|
||||||
${HEADERS}
|
${HEADERS}
|
||||||
@ -79,6 +70,7 @@ add_executable(slsReceiver
|
|||||||
set_target_properties(slsReceiver PROPERTIES
|
set_target_properties(slsReceiver PROPERTIES
|
||||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(slsReceiver
|
target_link_libraries(slsReceiver
|
||||||
slsReceiverShared
|
slsReceiverShared
|
||||||
pthread
|
pthread
|
||||||
@ -92,10 +84,11 @@ endif ()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
install(TARGETS slsReceiverShared slsReceiverStatic slsReceiver
|
install(TARGETS slsReceiverShared slsReceiver
|
||||||
RUNTIME DESTINATION bin
|
RUNTIME DESTINATION bin
|
||||||
LIBRARY DESTINATION lib
|
LIBRARY DESTINATION lib
|
||||||
ARCHIVE DESTINATION lib
|
ARCHIVE DESTINATION lib
|
||||||
PUBLIC_HEADER DESTINATION include)
|
PUBLIC_HEADER DESTINATION include
|
||||||
|
)
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user