mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-23 15:00:02 +02:00
Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor
This commit is contained in:
commit
4b9e41e23b
@ -11,11 +11,20 @@ option (USE_RECEIVER "Receiver" OFF)
|
||||
option (USE_GUI "GUI" OFF)
|
||||
option (USE_TESTS "TESTS" ON)
|
||||
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.0)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11 -Wno-misleading-indentation")
|
||||
else ()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11 ")
|
||||
endif ()
|
||||
#Testing for minimum version for compilers
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
# clang does not support -Wno-misleading-indentation
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.2)
|
||||
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_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(CBF)
|
||||
find_package(Doxygen)
|
||||
# find_package(PNG REQUIRED)
|
||||
|
||||
if (USE_HDF5)
|
||||
find_package(HDF5 1.10 COMPONENTS CXX)
|
||||
@ -35,7 +43,6 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
set(CMAKE_INSTALL_RPATH "$ORIGIN")
|
||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
|
||||
|
||||
|
||||
#zmq
|
||||
add_library(zmq STATIC IMPORTED GLOBAL)
|
||||
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}
|
||||
)
|
||||
|
||||
|
||||
if (USE_TEXTCLIENT)
|
||||
add_subdirectory(slsDetectorSoftware)
|
||||
endif (USE_TEXTCLIENT)
|
||||
@ -52,8 +58,7 @@ if (USE_RECEIVER)
|
||||
add_subdirectory(slsReceiverSoftware)
|
||||
add_subdirectory(manual/manual-api)
|
||||
endif (USE_RECEIVER)
|
||||
|
||||
|
||||
|
||||
if (USE_GUI)
|
||||
if (QT4_FOUND AND QWT_FOUND)
|
||||
add_subdirectory(slsDetectorGui)
|
||||
|
@ -4,28 +4,19 @@ set(SOURCES
|
||||
slsDetector/slsDetectorUsers.cpp
|
||||
slsDetector/slsDetectorCommand.cpp
|
||||
slsDetector/slsDetector.cpp
|
||||
../slsSupportLib/include/ClientInterface.cpp
|
||||
../slsSupportLib/include/utilities.cpp
|
||||
../slsSupportLib/src/string_utils.cpp
|
||||
${PROJECT_SOURCE_DIR}/slsSupportLib/include/ClientInterface.cpp
|
||||
${PROJECT_SOURCE_DIR}/slsSupportLib/include/utilities.cpp
|
||||
${PROJECT_SOURCE_DIR}/slsSupportLib/src/string_utils.cpp
|
||||
)
|
||||
|
||||
set(HEADERS
|
||||
)
|
||||
|
||||
include_directories(
|
||||
../slsSupportLib/include
|
||||
multiSlsDetector
|
||||
sharedMemory
|
||||
slsDetector
|
||||
)
|
||||
|
||||
add_library(slsDetectorStatic STATIC
|
||||
${SOURCES}
|
||||
${HEADERS}
|
||||
)
|
||||
set_target_properties(slsDetectorStatic PROPERTIES
|
||||
ARCHIVE_OUTPUT_NAME SlsDetector
|
||||
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
||||
${PROJECT_SOURCE_DIR}/slsSupportLib/include
|
||||
multiSlsDetector
|
||||
sharedMemory
|
||||
slsDetector
|
||||
)
|
||||
|
||||
add_library(slsDetectorShared SHARED
|
||||
@ -38,7 +29,6 @@ target_link_libraries(slsDetectorShared
|
||||
)
|
||||
|
||||
|
||||
|
||||
set(PUBLICHEADERS
|
||||
${PROJECT_SOURCE_DIR}/slsSupportLib/include/sls_detector_defs.h
|
||||
${PROJECT_SOURCE_DIR}/slsSupportLib/include/sls_detector_funcs.h
|
||||
@ -61,8 +51,6 @@ set_target_properties(slsDetectorShared PROPERTIES
|
||||
PUBLIC_HEADER "${PUBLICHEADERS}"
|
||||
)
|
||||
|
||||
|
||||
|
||||
add_subdirectory(slsDetectorClient)
|
||||
|
||||
if(DOXYGEN_FOUND)
|
||||
@ -75,7 +63,8 @@ if(DOXYGEN_FOUND)
|
||||
endif()
|
||||
|
||||
|
||||
install(TARGETS slsDetectorShared slsDetectorStatic
|
||||
install(TARGETS slsDetectorShared
|
||||
LIBRARY DESTINATION lib
|
||||
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
|
||||
${SOURCES}
|
||||
${HEADERS}
|
||||
@ -79,6 +70,7 @@ add_executable(slsReceiver
|
||||
set_target_properties(slsReceiver PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
||||
)
|
||||
|
||||
target_link_libraries(slsReceiver
|
||||
slsReceiverShared
|
||||
pthread
|
||||
@ -92,10 +84,11 @@ endif ()
|
||||
|
||||
|
||||
|
||||
install(TARGETS slsReceiverShared slsReceiverStatic slsReceiver
|
||||
install(TARGETS slsReceiverShared slsReceiver
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
PUBLIC_HEADER DESTINATION include)
|
||||
PUBLIC_HEADER DESTINATION include
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user