diff --git a/CMakeLists.txt b/CMakeLists.txt index 685499dd8..fdc30f5f7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 2.8) -set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH}) set (CALIBRATE OFF) option (USE_HDF5 "HDF5 File format" OFF) diff --git a/slsDetectorGui/CMakeLists.txt b/slsDetectorGui/CMakeLists.txt index 55c68ca60..bad299e19 100644 --- a/slsDetectorGui/CMakeLists.txt +++ b/slsDetectorGui/CMakeLists.txt @@ -105,11 +105,6 @@ set_target_properties(slsDetectorGui PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin ) -add_library(zmq STATIC IMPORTED ) - -set_target_properties(zmq PROPERTIES - IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/../slsReceiverSoftware/include/libzmq.a -) target_link_libraries(slsDetectorGui slsDetectorShared diff --git a/slsDetectorSoftware/CMakeLists.txt b/slsDetectorSoftware/CMakeLists.txt index 6513b012d..17370ba50 100644 --- a/slsDetectorSoftware/CMakeLists.txt +++ b/slsDetectorSoftware/CMakeLists.txt @@ -39,12 +39,6 @@ add_definitions( -DDACS_INT ) -add_library(zmq STATIC IMPORTED ) - -set_target_properties(zmq PROPERTIES - IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/../slsReceiverSoftware/include/libzmq.a -) - add_library(slsDetectorStatic STATIC ${SOURCES} ${HEADERS} diff --git a/slsReceiverSoftware/CMakeLists.txt b/slsReceiverSoftware/CMakeLists.txt index a7de05eed..7ea7a27fc 100644 --- a/slsReceiverSoftware/CMakeLists.txt +++ b/slsReceiverSoftware/CMakeLists.txt @@ -42,10 +42,11 @@ include_directories( include ) -add_library(zmq STATIC IMPORTED ) +add_library(zmq STATIC IMPORTED GLOBAL) +set(ZMQ_STATIC_ARCHIVE ${CMAKE_CURRENT_SOURCE_DIR}/include/libzmq.a) set_target_properties(zmq PROPERTIES - IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/include/libzmq.a + IMPORTED_LOCATION ${ZMQ_STATIC_ARCHIVE} ) add_library(slsReceiverStatic STATIC @@ -101,4 +102,8 @@ install(TARGETS slsReceiverShared slsReceiverStatic slsReceiver RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib - PUBLIC_HEADER DESTINATION include) \ No newline at end of file + PUBLIC_HEADER DESTINATION include) + + +install(FILES ${ZMQ_STATIC_ARCHIVE} +DESTINATION lib) \ No newline at end of file