diff --git a/CMakeLists.txt b/CMakeLists.txt index 5699cd2cd..d2d0c7098 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,6 +13,8 @@ find_package(Qt4) find_package(Qwt 6) find_package(CBF) find_package(Doxygen) + + if (USE_HDF5) find_package(HDF5 1.10 COMPONENTS CXX) endif (USE_HDF5) diff --git a/slsDetectorGui/CMakeLists.txt b/slsDetectorGui/CMakeLists.txt index 0178b9536..769b357bc 100644 --- a/slsDetectorGui/CMakeLists.txt +++ b/slsDetectorGui/CMakeLists.txt @@ -128,3 +128,5 @@ add_executable(gui_client set_target_properties(gui_client PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin ) + +install(TARGETS slsDetectorGui gui_client DESTINATION bin) \ No newline at end of file diff --git a/slsDetectorSoftware/CMakeLists.txt b/slsDetectorSoftware/CMakeLists.txt index 69f395cc9..6513b012d 100644 --- a/slsDetectorSoftware/CMakeLists.txt +++ b/slsDetectorSoftware/CMakeLists.txt @@ -58,11 +58,37 @@ add_library(slsDetectorShared SHARED ${SOURCES} ${HEADERS} ) + +set(PUBLICHEADERS + commonFiles/sls_detector_defs.h + commonFiles/sls_detector_funcs.h + commonFiles/error_defs.h + slsDetector/slsDetectorUtils.h + slsDetector/slsDetector.h + slsDetector/slsDetectorActions.h + slsDetector/slsDetectorBase.h + slsDetector/slsDetectorUsers.h + slsDetectorAnalysis/postProcessing.h + slsDetectorAnalysis/detectorData.h + slsDetectorAnalysis/angularConversion.h + slsDetectorAnalysis/angularConversionStatic.h + slsDetectorAnalysis/angleConversionConstant.h + slsDetectorAnalysis/badChannelCorrections.h + slsDetectorAnalysis/energyConversion.h + slsDetectorAnalysis/fileIO.h + slsDetectorAnalysis/fileIOStatic.h + multiSlsDetector/multiSlsDetector.h + slsReceiverInterface/receiverInterface.h + +) set_target_properties(slsDetectorShared PROPERTIES LIBRARY_OUTPUT_NAME SlsDetector LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin + PUBLIC_HEADER "${PUBLICHEADERS}" ) + + add_subdirectory(slsDetectorClient) if(DOXYGEN_FOUND) @@ -74,3 +100,7 @@ if(DOXYGEN_FOUND) ) endif() +install(TARGETS slsDetectorShared slsDetectorStatic + LIBRARY DESTINATION lib + PUBLIC_HEADER DESTINATION include + ARCHIVE DESTINATION lib) diff --git a/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.c b/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.c index c6ed49d63..51fd4eca7 100755 --- a/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.c +++ b/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.c @@ -4,8 +4,6 @@ #include "mcb_funcs.h" #include "registers_g.h" -#include "AD9257.h" // include "commonServerFunctions.h" - #ifdef SHAREDMEMORY #include "sharedmemory.h" #endif @@ -15,7 +13,7 @@ #include #include - +#include //for memory mapping @@ -53,7 +51,7 @@ int ififostart, ififostop, ififostep, ififo; int masterMode=NO_MASTER, syncMode=NO_SYNCHRONIZATION, timingMode=AUTO_TIMING; -enum externalSignalFlag signals[4]={EXT_SIG_OFF, EXT_SIG_OFF, EXT_SIG_OFF, EXT_SIG_OFF}; +enum externalSignalFlag signalMode=EXT_SIG_OFF; //for the 25um detectors @@ -544,259 +542,109 @@ u_int32_t getTotDutyCycle() { } -u_int32_t setExtSignal(int d, enum externalSignalFlag mode) { +u_int32_t setExtSignal(enum externalSignalFlag mode) { - //int modes[]={EXT_SIG_OFF, EXT_GATE_IN_ACTIVEHIGH, EXT_GATE_IN_ACTIVELOW,EXT_TRIG_IN_RISING,EXT_TRIG_IN_FALLING,EXT_RO_TRIG_IN_RISING, EXT_RO_TRIG_IN_FALLING,EXT_GATE_OUT_ACTIVEHIGH, EXT_GATE_OUT_ACTIVELOW, EXT_TRIG_OUT_RISING, EXT_TRIG_OUT_FALLING, EXT_RO_TRIG_OUT_RISING, EXT_RO_TRIG_OUT_FALLING}; - // int off=d*SIGNAL_OFFSET; + u_int32_t c; + c = bus_r(EXT_SIGNAL_REG); - u_int32_t c; - c=bus_r(EXT_SIGNAL_REG); - - if (d>=0 && d<4) { - signals[d]=mode; #ifdef VERBOSE - printf("settings signal variable number %d to value %04x\n", d, signals[d]); + printf("settings signal variable number %d to value %04x\n", d, signals[d]); #endif - // if output signal, set it! + switch (mode) { + case TRIGGER_IN_RISING_EDGE: + case TRIGGER_IN_FALLING_EDGE: - switch (mode) { - case GATE_IN_ACTIVE_HIGH: - case GATE_IN_ACTIVE_LOW: - if (timingMode==GATE_FIX_NUMBER || timingMode==GATE_WITH_START_TRIGGER) - setFPGASignal(d,mode); - else - setFPGASignal(d,SIGNAL_OFF); - break; - case TRIGGER_IN_RISING_EDGE: - case TRIGGER_IN_FALLING_EDGE: - if (timingMode==TRIGGER_EXPOSURE || timingMode==GATE_WITH_START_TRIGGER) - setFPGASignal(d,mode); - else - setFPGASignal(d,SIGNAL_OFF); - break; - case RO_TRIGGER_IN_RISING_EDGE: - case RO_TRIGGER_IN_FALLING_EDGE: - if (timingMode==TRIGGER_READOUT) - setFPGASignal(d,mode); - else - setFPGASignal(d,SIGNAL_OFF); - break; - case MASTER_SLAVE_SYNCHRONIZATION: - setSynchronization(syncMode); - break; - default: - setFPGASignal(d,mode); - break; - } + // set variable + signalMode = mode; - setTiming(GET_EXTERNAL_COMMUNICATION_MODE); - } + // set signal only if trigger mode + if (timingMode==TRIGGER_EXPOSURE) + setFPGASignal(mode); + // switch off if not trigger mode, but variable remembers value + else + setFPGASignal(SIGNAL_OFF); + break; + + default: + mode = SIGNAL_OFF; + signalMode = mode; + setFPGASignal(mode); + break; + } + + return getExtSignal(); +} -// if (mode<=RO_TRIGGER_OUT_FALLING_EDGE && mode>=0) -// bus_w(EXT_SIGNAL_REG,((modes[mode])<=0) { -#ifdef VERBOSE - printf("writing signal register number %d mode %04x\n",d, modes[mode]); + // check and then update variable + if ((mode == SIGNAL_OFF) || (mode == TRIGGER_IN_RISING_EDGE) || (mode == TRIGGER_IN_FALLING_EDGE)) { + #ifdef VERYVERBOSE + printf("gettings signal register number %d value %04x\n", d, (int)mode); #endif - bus_w(EXT_SIGNAL_REG,((modes[mode])<>off); - - if (mode=0 && d<4) { -#ifdef VERBOSE - printf("gettings signal variable number %d value %04x\n", d, signals[d]); -#endif - return signals[d]; - } else - return -1; - - -} - - -int getFPGASignal(int d) { - - int modes[]={SIGNAL_OFF, GATE_IN_ACTIVE_HIGH, GATE_IN_ACTIVE_LOW,TRIGGER_IN_RISING_EDGE, TRIGGER_IN_FALLING_EDGE,RO_TRIGGER_IN_RISING_EDGE, RO_TRIGGER_IN_FALLING_EDGE, GATE_OUT_ACTIVE_HIGH, GATE_OUT_ACTIVE_LOW, TRIGGER_OUT_RISING_EDGE, TRIGGER_OUT_FALLING_EDGE, RO_TRIGGER_OUT_RISING_EDGE,RO_TRIGGER_OUT_FALLING_EDGE}; - - int off=d*SIGNAL_OFFSET; - int mode=((bus_r(EXT_SIGNAL_REG)&(SIGNAL_MASK<>off); - - if (mode<=RO_TRIGGER_OUT_FALLING_EDGE) { - if (modes[mode]!=SIGNAL_OFF && signals[d]!=MASTER_SLAVE_SYNCHRONIZATION) - signals[d]=modes[mode]; -#ifdef VERYVERBOSE - printf("gettings signal register number %d value %04x\n", d, modes[mode]); -#endif - return modes[mode]; + return (int)mode; } else - return -1; - + return -1; } -/* -enum externalCommunicationMode{ - GET_EXTERNAL_COMMUNICATION_MODE, - AUTO, - TRIGGER_EXPOSURE_SERIES, - TRIGGER_EXPOSURE_BURST, - TRIGGER_READOUT, - TRIGGER_COINCIDENCE_WITH_INTERNAL_ENABLE, - GATE_FIX_NUMBER, - GATE_FIX_DURATION, - GATE_WITH_START_TRIGGER, - GATE_COINCIDENCE_WITH_INTERNAL_ENABLE -}; -*/ - - int setTiming(int ti) { + // set + if (ti != GET_EXTERNAL_COMMUNICATION_MODE) { - int ret=GET_EXTERNAL_COMMUNICATION_MODE; + // trigger + if (ti == TRIGGER_EXPOSURE) { + timingMode = ti; + if ((signalMode == TRIGGER_IN_RISING_EDGE) || (signalMode == TRIGGER_IN_FALLING_EDGE)) + setFPGASignal(signalMode); + else + setFPGASignal(SIGNAL_OFF); // only if both (timing & extsig) configured, its set to trigger, else off + } - int g=-1, t=-1, rot=-1; - - int i; - - switch (ti) { - case AUTO_TIMING: - timingMode=ti; - // disable all gates/triggers in except if used for master/slave synchronization - for (i=0; i<4; i++) { - if (getFPGASignal(i)>0 && getFPGASignal(i)=0 && t>=0 && rot<0) { - ret=GATE_WITH_START_TRIGGER; - } else if (g<0 && t>=0 && rot<0) { - ret=TRIGGER_EXPOSURE; - } else if (g>=0 && t<0 && rot<0) { - ret=GATE_FIX_NUMBER; - } else if (g<0 && t<0 && rot>0) { - ret=TRIGGER_READOUT; - } else if (g<0 && t<0 && rot<0) { - ret=AUTO_TIMING; - } - - // timingMode=ret; - - return ret; + // get + int s = getFPGASignal(); + if ((s == TRIGGER_IN_RISING_EDGE) || (s == TRIGGER_IN_FALLING_EDGE)) + return TRIGGER_EXPOSURE; + return AUTO_TIMING; } @@ -1158,13 +1006,13 @@ int64_t getActualTime(){ int64_t getMeasurementTime(){ int64_t v=get64BitReg(GET_MEASUREMENT_TIME_LSB_REG, GET_MEASUREMENT_TIME_MSB_REG); - u_int64_t mask=0x8000000000000000; + /* u_int64_t mask=0x8000000000000000; if (v & mask ) { #ifdef VERBOSE printf("no measurement time left\n"); #endif return -1E+9; - } else + } else*/ return v/(1E-9*CLK_FREQ); } @@ -2139,239 +1987,13 @@ int clearRAM() { int setMaster(int f) { - - int i; - switch(f) { - case NO_MASTER: - // switch of gates or triggers - masterMode=NO_MASTER; - for (i=0; i<4; i++) { - if (signals[i]==MASTER_SLAVE_SYNCHRONIZATION) { - setFPGASignal(i,SIGNAL_OFF); - } - } - break; - case IS_MASTER: - // configure gate or trigger out - masterMode=IS_MASTER; - for (i=0; i<4; i++) { - if (signals[i]==MASTER_SLAVE_SYNCHRONIZATION) { - switch (syncMode) { - case NO_SYNCHRONIZATION: - setFPGASignal(i,SIGNAL_OFF); - break; - case MASTER_GATES: - setFPGASignal(i,GATE_OUT_ACTIVE_HIGH); - break; - case MASTER_TRIGGERS: - setFPGASignal(i,TRIGGER_OUT_RISING_EDGE); - break; - case SLAVE_STARTS_WHEN_MASTER_STOPS: - setFPGASignal(i,RO_TRIGGER_OUT_RISING_EDGE); - break; - default: - ; - } - } - } - break; - case IS_SLAVE: - // configure gate or trigger in - masterMode=IS_SLAVE; - for (i=0; i<4; i++) { - if (signals[i]==MASTER_SLAVE_SYNCHRONIZATION) { - switch (syncMode) { - case NO_SYNCHRONIZATION: - setFPGASignal(i,SIGNAL_OFF); - break; - case MASTER_GATES: - setFPGASignal(i,GATE_IN_ACTIVE_HIGH); - break; - case MASTER_TRIGGERS: - setFPGASignal(i,TRIGGER_IN_RISING_EDGE); - break; - case SLAVE_STARTS_WHEN_MASTER_STOPS: - setFPGASignal(i,TRIGGER_IN_RISING_EDGE); - break; - default: - ; - } - } - } - break; - default: - //do nothing - break; - } - - switch(masterMode) { - case NO_MASTER: - return NO_MASTER; - - - case IS_MASTER: - for (i=0; i<4; i++) { - if (signals[i]==MASTER_SLAVE_SYNCHRONIZATION) { - switch (syncMode) { - case NO_SYNCHRONIZATION: - return IS_MASTER; - case MASTER_GATES: - if (getFPGASignal(i)==GATE_OUT_ACTIVE_HIGH) - return IS_MASTER; - else - return NO_MASTER; - case MASTER_TRIGGERS: - if (getFPGASignal(i)==TRIGGER_OUT_RISING_EDGE) - return IS_MASTER; - else - return NO_MASTER; - case SLAVE_STARTS_WHEN_MASTER_STOPS: - if (getFPGASignal(i)==RO_TRIGGER_OUT_RISING_EDGE) - return IS_MASTER; - else - return NO_MASTER; - default: - return NO_MASTER; - } - - } - } - break; - - case IS_SLAVE: - for (i=0; i<4; i++) { - if (signals[i]==MASTER_SLAVE_SYNCHRONIZATION) { - switch (syncMode) { - case NO_SYNCHRONIZATION: - return IS_SLAVE; - case MASTER_GATES: - if (getFPGASignal(i)==GATE_IN_ACTIVE_HIGH) - return IS_SLAVE; - else - return NO_MASTER; - case MASTER_TRIGGERS: - case SLAVE_STARTS_WHEN_MASTER_STOPS: - if (getFPGASignal(i)==TRIGGER_IN_RISING_EDGE) - return IS_SLAVE; - else - return NO_MASTER; - default: - return NO_MASTER; - } - } - } - break; - } - return masterMode; + return NO_MASTER; } int setSynchronization(int s) { - - int i; - - switch(s) { - case NO_SYNCHRONIZATION: - syncMode=NO_SYNCHRONIZATION; - for (i=0; i<4; i++) { - if (signals[i]==MASTER_SLAVE_SYNCHRONIZATION) { - setFPGASignal(i,SIGNAL_OFF); - } - } - break; - // disable external signals? - case MASTER_GATES: - // configure gate in or out - syncMode=MASTER_GATES; - for (i=0; i<4; i++) { - if (signals[i]==MASTER_SLAVE_SYNCHRONIZATION) { - if (masterMode==IS_MASTER) - setFPGASignal(i,GATE_OUT_ACTIVE_HIGH); - else if (masterMode==IS_SLAVE) - setFPGASignal(i,GATE_IN_ACTIVE_HIGH); - } - } - - break; - case MASTER_TRIGGERS: - // configure trigger in or out - syncMode=MASTER_TRIGGERS; - for (i=0; i<4; i++) { - if (signals[i]==MASTER_SLAVE_SYNCHRONIZATION) { - if (masterMode==IS_MASTER) - setFPGASignal(i,TRIGGER_OUT_RISING_EDGE); - else if (masterMode==IS_SLAVE) - setFPGASignal(i,TRIGGER_IN_RISING_EDGE); - } - } - break; - - - case SLAVE_STARTS_WHEN_MASTER_STOPS: - // configure trigger in or out - syncMode=SLAVE_STARTS_WHEN_MASTER_STOPS; - for (i=0; i<4; i++) { - if (signals[i]==MASTER_SLAVE_SYNCHRONIZATION) { - if (masterMode==IS_MASTER) - setFPGASignal(i,RO_TRIGGER_OUT_RISING_EDGE); - else if (masterMode==IS_SLAVE) - setFPGASignal(i,TRIGGER_IN_RISING_EDGE); - } - } - break; - - - default: - //do nothing - break; - } - - switch (syncMode) { - - case NO_SYNCHRONIZATION: - return NO_SYNCHRONIZATION; - - case MASTER_GATES: - - for (i=0; i<4; i++) { - if (signals[i]==MASTER_SLAVE_SYNCHRONIZATION) { - if (masterMode==IS_MASTER && getFPGASignal(i)==GATE_OUT_ACTIVE_HIGH) - return MASTER_GATES; - else if (masterMode==IS_SLAVE && getFPGASignal(i)==GATE_IN_ACTIVE_HIGH) - return MASTER_GATES; - } - } - return NO_SYNCHRONIZATION; - - case MASTER_TRIGGERS: - for (i=0; i<4; i++) { - if (signals[i]==MASTER_SLAVE_SYNCHRONIZATION) { - if (masterMode==IS_MASTER && getFPGASignal(i)==TRIGGER_OUT_RISING_EDGE) - return MASTER_TRIGGERS; - else if (masterMode==IS_SLAVE && getFPGASignal(i)==TRIGGER_IN_RISING_EDGE) - return MASTER_TRIGGERS; - } - } - return NO_SYNCHRONIZATION; - - case SLAVE_STARTS_WHEN_MASTER_STOPS: - for (i=0; i<4; i++) { - if (signals[i]==MASTER_SLAVE_SYNCHRONIZATION) { - if (masterMode==IS_MASTER && getFPGASignal(i)==RO_TRIGGER_OUT_RISING_EDGE) - return SLAVE_STARTS_WHEN_MASTER_STOPS; - else if (masterMode==IS_SLAVE && getFPGASignal(i)==TRIGGER_IN_RISING_EDGE) - return SLAVE_STARTS_WHEN_MASTER_STOPS; - } - } - return NO_SYNCHRONIZATION; - - default: - return NO_SYNCHRONIZATION; - - } - return NO_SYNCHRONIZATION; - + return NO_SYNCHRONIZATION; } diff --git a/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.h b/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.h index 3149a3546..50b143c70 100755 --- a/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.h +++ b/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.h @@ -47,11 +47,11 @@ u_int32_t getTotClockDivider(); u_int32_t setTotDutyCycle(int d); u_int32_t getTotDutyCycle(); -u_int32_t setExtSignal(int d, enum externalSignalFlag mode); -int getExtSignal(int d); +u_int32_t setExtSignal(enum externalSignalFlag mode); +int getExtSignal(); -u_int32_t setFPGASignal(int d, enum externalSignalFlag mode); -int getFPGASignal(int d); +u_int32_t setFPGASignal(enum externalSignalFlag mode); +int getFPGASignal(); int setTiming(int t); diff --git a/slsDetectorSoftware/gotthardDetectorServer/gitInfo.txt b/slsDetectorSoftware/gotthardDetectorServer/gitInfo.txt index 0f62ba317..14cea4392 100644 --- a/slsDetectorSoftware/gotthardDetectorServer/gitInfo.txt +++ b/slsDetectorSoftware/gotthardDetectorServer/gitInfo.txt @@ -1,9 +1,9 @@ Path: slsDetectorsPackage/slsDetectorSoftware/gotthardDetectorServer URL: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git Repository Root: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git -Repsitory UUID: e6bd874a88493557fc5127d4a1686832299aaf06 -Revision: 217 +Repsitory UUID: 94b61ea2c40176cf2a9a36c7d6477016cd5d7fcd +Revision: 218 Branch: 3.0.1 Last Changed Author: Dhanya_Thattil -Last Changed Rev: 3346 -Last Changed Date: 2018-02-07 09:09:56.000000002 +0100 ./server_funcs.c +Last Changed Rev: 3351 +Last Changed Date: 2018-02-08 11:04:28.000000002 +0100 ./firmware_funcs.c diff --git a/slsDetectorSoftware/gotthardDetectorServer/gitInfoGotthard.h b/slsDetectorSoftware/gotthardDetectorServer/gitInfoGotthard.h index 96f110d39..ba801bef8 100644 --- a/slsDetectorSoftware/gotthardDetectorServer/gitInfoGotthard.h +++ b/slsDetectorSoftware/gotthardDetectorServer/gitInfoGotthard.h @@ -1,6 +1,6 @@ #define GITURL "git@github.com:slsdetectorgroup/slsDetectorPackage.git" -#define GITREPUUID "e6bd874a88493557fc5127d4a1686832299aaf06" +#define GITREPUUID "94b61ea2c40176cf2a9a36c7d6477016cd5d7fcd" #define GITAUTH "Dhanya_Thattil" -#define GITREV 0x3346 -#define GITDATE 0x20180207 +#define GITREV 0x3351 +#define GITDATE 0x20180208 #define GITBRANCH "3.0.1" diff --git a/slsDetectorSoftware/gotthardDetectorServer/gotthardDetectorServerv3.0.1.1 b/slsDetectorSoftware/gotthardDetectorServer/gotthardDetectorServerv3.0.1.1 new file mode 100755 index 000000000..38819e9c9 Binary files /dev/null and b/slsDetectorSoftware/gotthardDetectorServer/gotthardDetectorServerv3.0.1.1 differ diff --git a/slsDetectorSoftware/gotthardDetectorServer/server_funcs.c b/slsDetectorSoftware/gotthardDetectorServer/server_funcs.c index 645b4b90e..1cbbfbfb1 100755 --- a/slsDetectorSoftware/gotthardDetectorServer/server_funcs.c +++ b/slsDetectorSoftware/gotthardDetectorServer/server_funcs.c @@ -10,6 +10,7 @@ #include "trimming_funcs.h" #include "registers_g.h" #include "gitInfoGotthard.h" +#include "AD9257.h" // include "commonServerFunctions.h" #define FIFO_DATA_REG_OFF 0x50<<11 #define CONTROL_REG 0x24<<11 @@ -460,24 +461,21 @@ int set_external_signal_flag(int file_des) { break; default: - if (differentClients==0 || lockStatus==0) { - retval=setExtSignal(signalindex,flag); - } else { - if (lockStatus!=0) { - ret=FAIL; - sprintf(mess,"Detector locked by %s\n", lastClientIP); - } - } - + if (lockStatus && differentClients) { + ret=FAIL; + sprintf(mess,"Detector locked by %s\n", lastClientIP); + } else if (signalindex > 0) { + ret=FAIL; + sprintf(mess,"Signal index %d is reserved. Only index 0 can be configured.\n", signalindex); + } else { + retval=setExtSignal(flag); + } } - #ifdef VERBOSE printf("Setting external signal %d to flag %d\n",signalindex,flag ); printf("Set to flag %d\n",retval); #endif - } else { - ret=FAIL; } if (ret==OK && differentClients!=0) diff --git a/slsDetectorSoftware/slsDetectorClient/CMakeLists.txt b/slsDetectorSoftware/slsDetectorClient/CMakeLists.txt index 0dcc2fb9a..aa65dcf79 100644 --- a/slsDetectorSoftware/slsDetectorClient/CMakeLists.txt +++ b/slsDetectorSoftware/slsDetectorClient/CMakeLists.txt @@ -68,3 +68,4 @@ set_target_properties(sls_detector_help PROPERTIES COMPILE_DEFINITIONS HELP=1 ) +install(TARGETS sls_detector_put sls_detector_get sls_detector_acquire sls_detector_help DESTINATION bin) diff --git a/slsReceiverSoftware/CMakeLists.txt b/slsReceiverSoftware/CMakeLists.txt index 9a5bb6019..a7de05eed 100644 --- a/slsReceiverSoftware/CMakeLists.txt +++ b/slsReceiverSoftware/CMakeLists.txt @@ -61,9 +61,21 @@ add_library(slsReceiverShared SHARED ${SOURCES} ${HEADERS} ) + +set(PUBLICHEADERS + include/sls_receiver_defs.h + include/ansi.h + include/sls_receiver_funcs.h + include/MySocketTCP.h + include/genericSocket.h + +) + + set_target_properties(slsReceiverShared PROPERTIES LIBRARY_OUTPUT_NAME SlsReceiver LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin + PUBLIC_HEADER "${PUBLICHEADERS}" ) add_executable(slsReceiver @@ -82,3 +94,11 @@ target_link_libraries(slsReceiver if (HDF5_FOUND) target_link_libraries(slsReceiver ${HDF5_LIBRARIES}) endif () + + + +install(TARGETS slsReceiverShared slsReceiverStatic slsReceiver + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + PUBLIC_HEADER DESTINATION include) \ No newline at end of file