diff --git a/field/CMakeLists.txt b/field/CMakeLists.txt index 7123936..d3c9c24 100644 --- a/field/CMakeLists.txt +++ b/field/CMakeLists.txt @@ -2,37 +2,22 @@ # the array . # The extension is already found. Any number of sources could be listed here. -Set(SYSTEM_INCLUDE_DIRECTORIES -${SYSTEM_INCLUDE_DIRECTORIES} -${BASE_INCLUDE_DIRECTORIES} -) - -set(INCLUDE_DIRECTORIES -${R3BROOT_SOURCE_DIR}/field -${R3BFRS_SOURCE_DIR}/field -) - -include_directories( ${INCLUDE_DIRECTORIES}) -include_directories(SYSTEM ${SYSTEM_INCLUDE_DIRECTORIES}) - -set(LINK_DIRECTORIES -${ROOT_LIBRARY_DIR} -${FAIRROOT_LIBRARY_DIR} -) - -link_directories( ${LINK_DIRECTORIES}) - -set(SRCS -FRSWasaFieldMap.cxx -) +set(SRCS FRSWasaFieldMap.cxx) # fill list of header files from list of source files # by exchanging the file extension -CHANGE_FILE_EXTENSION(*.cxx *.h HEADERS "${SRCS}") - -set(LINKDEF FRSFieldLinkDef.h) -set(LIBRARY_NAME FRSWASAFIELD) -set(DEPENDENCIES - Base ) - -GENERATE_LIBRARY() +change_file_extension(*.cxx *.h HEADERS "${SRCS}") + +add_library_with_dictionary( + LIBNAME + FRSWASAFIELD + LINKDEF + FRSFieldLinkDef.h + HEADERS + ${HEADERS} + SRCS + ${SRCS} + INCLUDEDIRS + ${CMAKE_CURRENT_SOURCE_DIR} + DEPENDENCIES + Field) diff --git a/frsdata/CMakeLists.txt b/frsdata/CMakeLists.txt index 6dbe994..38f947c 100644 --- a/frsdata/CMakeLists.txt +++ b/frsdata/CMakeLists.txt @@ -2,54 +2,40 @@ # the array . # The extension is already found. Any number of sources could be listed here. -Set(SYSTEM_INCLUDE_DIRECTORIES -${SYSTEM_INCLUDE_DIRECTORIES} -${BASE_INCLUDE_DIRECTORIES} -) - -set(INCLUDE_DIRECTORIES -${R3BROOT_SOURCE_DIR}/r3bdata -${R3BFRS_SOURCE_DIR}/frsdata -) - -include_directories( ${INCLUDE_DIRECTORIES}) -include_directories(SYSTEM ${SYSTEM_INCLUDE_DIRECTORIES}) - -set(LINK_DIRECTORIES -${ROOT_LIBRARY_DIR} -${FAIRROOT_LIBRARY_DIR} -) - -link_directories( ${LINK_DIRECTORIES}) - set(SRCS -R3BSeetramCalData.cxx -R3BFrsMappedData.cxx -FRSMusicMappedData.cxx -FRSMusicCalData.cxx -FRSMusicHitData.cxx -R3BTpcMappedData.cxx -R3BTpcCalData.cxx -R3BTpcHitData.cxx -R3BFrsS4Data.cxx -R3BMwMappedData.cxx -R3BMwHitData.cxx -R3BMdcMappedData.cxx -WASATofPoint.cxx -WASAMdcPoint.cxx -FrsSpillMappedData.cxx -VftxSciMappedData.cxx -FrsSciTcalData.cxx -FrsSciSingleTcalData.cxx -) + R3BSeetramCalData.cxx + R3BFrsMappedData.cxx + FRSMusicMappedData.cxx + FRSMusicCalData.cxx + FRSMusicHitData.cxx + R3BTpcMappedData.cxx + R3BTpcCalData.cxx + R3BTpcHitData.cxx + R3BFrsS4Data.cxx + R3BMwMappedData.cxx + R3BMwHitData.cxx + R3BMdcMappedData.cxx + WASATofPoint.cxx + WASAMdcPoint.cxx + FrsSpillMappedData.cxx + VftxSciMappedData.cxx + FrsSciTcalData.cxx + FrsSciSingleTcalData.cxx) # fill list of header files from list of source files # by exchanging the file extension -CHANGE_FILE_EXTENSION(*.cxx *.h HEADERS "${SRCS}") - -set(LINKDEF FRSDataLinkDef.h) -set(LIBRARY_NAME R3BFRSData) -set(DEPENDENCIES - Base FairTools R3BData) - -GENERATE_LIBRARY() +change_file_extension(*.cxx *.h HEADERS "${SRCS}") + +add_library_with_dictionary( + LIBNAME + R3BFRSData + LINKDEF + FRSDataLinkDef.h + HEADERS + ${HEADERS} + SRCS + ${SRCS} + INCLUDEDIRS + ${CMAKE_CURRENT_SOURCE_DIR} + DEPENDENCIES + R3BData) diff --git a/frsdetectors/CMakeLists.txt b/frsdetectors/CMakeLists.txt index 4fdb6b7..314338f 100644 --- a/frsdetectors/CMakeLists.txt +++ b/frsdetectors/CMakeLists.txt @@ -2,57 +2,40 @@ # the array . # The extension is already found. Any number of sources could be listed here. -Set(SYSTEM_INCLUDE_DIRECTORIES -${SYSTEM_INCLUDE_DIRECTORIES} -${BASE_INCLUDE_DIRECTORIES} -) - -set(INCLUDE_DIRECTORIES -${R3BROOT_SOURCE_DIR}/r3bdata -${R3BROOT_SOURCE_DIR}/r3bdata/wrData -${R3BROOT_SOURCE_DIR}/r3bbase -${R3BFRS_SOURCE_DIR}/frsdata -${R3BFRS_SOURCE_DIR}/frsdetectors -) - -include_directories( ${INCLUDE_DIRECTORIES}) -include_directories(SYSTEM ${SYSTEM_INCLUDE_DIRECTORIES}) - -set(LINK_DIRECTORIES -${ROOT_LIBRARY_DIR} -${FAIRROOT_LIBRARY_DIR} -) - -link_directories( ${LINK_DIRECTORIES}) - set(SRCS -R3BFrsContFact.cxx -R3BSeetramMapped2Cal.cxx -R3BSeetramCalPar.cxx -FRSMusicMapped2CalPar.cxx -FRSMusicMapped2Cal.cxx -FRSMusicCalPar.cxx -FRSMusicHitPar.cxx -FRSMusicCal2HitPar.cxx -FRSMusicCal2Hit.cxx -R3BTpcCalPar.cxx -R3BTpcMapped2CalPar.cxx -R3BTpcMapped2Cal.cxx -R3BTpcCal2Hit.cxx -R3BFrsHit2AnaS4.cxx -R3BFrsHit2AnaS4Par.cxx -R3BFrsAnaPar.cxx -R3BMWMapped2Hit.cxx -FrsRatesSpill.cxx -) + R3BFrsContFact.cxx + R3BSeetramMapped2Cal.cxx + R3BSeetramCalPar.cxx + FRSMusicMapped2CalPar.cxx + FRSMusicMapped2Cal.cxx + FRSMusicCalPar.cxx + FRSMusicHitPar.cxx + FRSMusicCal2HitPar.cxx + FRSMusicCal2Hit.cxx + R3BTpcCalPar.cxx + R3BTpcMapped2CalPar.cxx + R3BTpcMapped2Cal.cxx + R3BTpcCal2Hit.cxx + R3BFrsHit2AnaS4.cxx + R3BFrsHit2AnaS4Par.cxx + R3BFrsAnaPar.cxx + R3BMWMapped2Hit.cxx + FrsRatesSpill.cxx) # fill list of header files from list of source files # by exchanging the file extension -CHANGE_FILE_EXTENSION(*.cxx *.h HEADERS "${SRCS}") - -set(LINKDEF FRSDetLinkDef.h) -set(LIBRARY_NAME R3BFRS) -set(DEPENDENCIES - Spectrum Base FairTools R3BData R3BBase) - -GENERATE_LIBRARY() +change_file_extension(*.cxx *.h HEADERS "${SRCS}") + +add_library_with_dictionary( + LIBNAME + R3BFRS + LINKDEF + FRSDetLinkDef.h + HEADERS + ${HEADERS} + SRCS + ${SRCS} + INCLUDEDIRS + ${CMAKE_CURRENT_SOURCE_DIR} + DEPENDENCIES + R3BFRSData) diff --git a/frsgen/CMakeLists.txt b/frsgen/CMakeLists.txt index 7fc20bd..9d5ca15 100644 --- a/frsgen/CMakeLists.txt +++ b/frsgen/CMakeLists.txt @@ -15,41 +15,22 @@ # the array . # The extension is already found. Any number of sources could be listed here. -Set(SYSTEM_INCLUDE_DIRECTORIES -${SYSTEM_INCLUDE_DIRECTORIES} -${BASE_INCLUDE_DIRECTORIES} -) - -set(INCLUDE_DIRECTORIES -${R3BROOT_SOURCE_DIR}/field -${R3BROOT_SOURCE_DIR}/generators -${R3BROOT_SOURCE_DIR}/r3bgen -${R3BROOT_SOURCE_DIR}/r3bdata -${R3BFRS_SOURCE_DIR}/frsgen -) - -include_directories( ${INCLUDE_DIRECTORIES}) -include_directories(SYSTEM ${SYSTEM_INCLUDE_DIRECTORIES}) - -set(LINK_DIRECTORIES -${ROOT_LIBRARY_DIR} -${FairLogger_LIBDIR} -${FAIRROOT_LIBRARY_DIR} -) - -link_directories( ${LINK_DIRECTORIES}) - -set(SRCS -FRSResonanceGenerator.cxx -) +set(SRCS FRSResonanceGenerator.cxx) # fill list of header files from list of source files # by exchanging the file extension -CHANGE_FILE_EXTENSION(*.cxx *.h HEADERS "${SRCS}") - -set(LINKDEF FRSGenLinkDef.h) -set(LIBRARY_NAME FrsGen) -set(DEPENDENCIES - FairTools Field Gen R3BData) - -GENERATE_LIBRARY() +change_file_extension(*.cxx *.h HEADERS "${SRCS}") + +add_library_with_dictionary( + LIBNAME + FrsGen + LINKDEF + FRSGenLinkDef.h + HEADERS + ${HEADERS} + SRCS + ${SRCS} + INCLUDEDIRS + ${CMAKE_CURRENT_SOURCE_DIR} + DEPENDENCIES + R3BData) diff --git a/frssource/CMakeLists.txt b/frssource/CMakeLists.txt index 6447306..8fa6a70 100644 --- a/frssource/CMakeLists.txt +++ b/frssource/CMakeLists.txt @@ -2,57 +2,37 @@ # the array . # The extension is already found. Any number of sources could be listed here. -set(SYSTEM_INCLUDE_DIRECTORIES -${SYSTEM_INCLUDE_DIRECTORIES} -${BASE_INCLUDE_DIRECTORIES} -${ucesb_INCLUDE_DIR} -) - -set(INCLUDE_DIRECTORIES -#put here all directories where header files are located -${R3BROOT_SOURCE_DIR}/r3bsource/base -${R3BROOT_SOURCE_DIR}/r3bbase -${R3BROOT_SOURCE_DIR}/r3bdata -${R3BROOT_SOURCE_DIR}/r3bdata/wrData -${R3BFRS_SOURCE_DIR}/frssource -${R3BFRS_SOURCE_DIR}/frsdata -) - -set(LINK_DIRECTORIES -${ROOT_LIBRARY_DIR} -${FAIRROOT_LIBRARY_DIR} -${ucesb_LIBRARY_DIR} -) - -include_directories( ${INCLUDE_DIRECTORIES}) -include_directories(SYSTEM ${SYSTEM_INCLUDE_DIRECTORIES}) -link_directories( ${LINK_DIRECTORIES}) - set(SRCS -#R3BFrsReader.cxx -VftxSciReader.cxx -R3BFrsReaderNov19.cxx -FrsMusicReader.cxx -FrsTpcReader.cxx -R3BWasaReader.cxx -) - -Set(STRUCT_HEADERS -ext_h101_frs.h -ext_h101_tpc.h -ext_h101_frssci.h -ext_h101_frsmusic.h -ext_h101_wasa.h -) + #R3BFrsReader.cxx + VftxSciReader.cxx + R3BFrsReaderNov19.cxx + FrsMusicReader.cxx + FrsTpcReader.cxx + R3BWasaReader.cxx) + +set(STRUCT_HEADERS + ext_h101_frs.h + ext_h101_tpc.h + ext_h101_frssci.h + ext_h101_frsmusic.h + ext_h101_wasa.h) # fill list of header files from list of source files # by exchanging the file extension -CHANGE_FILE_EXTENSION(*.cxx *.h HEADERS "${SRCS}") -Set(HEADERS ${STRUCT_HEADERS} ${HEADERS}) - -set(LINKDEF_FILE SourceLinkDef.h) -set(DEPENDENCIES - R3BBase Base R3BFRS R3Bsource ${ucesb_LIBRARY_SHARED} FairTools) -set(LIBRARY_NAME R3BFRSSource) - -GENERATE_LIBRARY() +change_file_extension(*.cxx *.h HEADERS "${SRCS}") +set(HEADERS ${STRUCT_HEADERS} ${HEADERS}) + +add_library_with_dictionary( + LIBNAME + R3BFRSSource + LINKDEF + SourceLinkDef.h + HEADERS + ${HEADERS} + SRCS + ${SRCS} + INCLUDEDIRS + ${CMAKE_CURRENT_SOURCE_DIR} + DEPENDENCIES + R3BFRS + R3BSource) diff --git a/online/CMakeLists.txt b/online/CMakeLists.txt index 8a8218d..57d72bf 100644 --- a/online/CMakeLists.txt +++ b/online/CMakeLists.txt @@ -2,44 +2,23 @@ # the array . # The extension is already found. Any number of sources could be listed here. -Set(SYSTEM_INCLUDE_DIRECTORIES -${SYSTEM_INCLUDE_DIRECTORIES} -${BASE_INCLUDE_DIRECTORIES} -) - -set(INCLUDE_DIRECTORIES -${R3BROOT_SOURCE_DIR}/r3bdata -${R3BROOT_SOURCE_DIR}/r3bdata/wrData -${R3BROOT_SOURCE_DIR}/r3bbase -${R3BFRS_SOURCE_DIR}/frsdata -${R3BFRS_SOURCE_DIR}/frsdetectors -${R3BFRS_SOURCE_DIR}/online -) - -include_directories( ${INCLUDE_DIRECTORIES}) -include_directories(SYSTEM ${SYSTEM_INCLUDE_DIRECTORIES}) - -set(LINK_DIRECTORIES -${ROOT_LIBRARY_DIR} -${FAIRROOT_LIBRARY_DIR} -) - -link_directories( ${LINK_DIRECTORIES}) - -set(SRCS -R3BFrsOnlineSpectra.cxx -FrsMWOnlineSpectra.cxx -FrsTpcOnlineSpectra.cxx -FrsMusicOnlineSpectra.cxx -) +set(SRCS R3BFrsOnlineSpectra.cxx FrsMWOnlineSpectra.cxx FrsTpcOnlineSpectra.cxx + FrsMusicOnlineSpectra.cxx) # fill list of header files from list of source files # by exchanging the file extension -CHANGE_FILE_EXTENSION(*.cxx *.h HEADERS "${SRCS}") - -set(LINKDEF FRSOnlineLinkDef.h) -set(LIBRARY_NAME FRSOnline) -set(DEPENDENCIES - Spectrum Base FairTools R3BData R3BBase) - -GENERATE_LIBRARY() +change_file_extension(*.cxx *.h HEADERS "${SRCS}") + +add_library_with_dictionary( + LIBNAME + FRSOnline + LINKDEF + FRSOnlineLinkDef.h + HEADERS + ${HEADERS} + SRCS + ${SRCS} + INCLUDEDIRS + ${CMAKE_CURRENT_SOURCE_DIR} + DEPENDENCIES + R3BFRSData) diff --git a/sci/CMakeLists.txt b/sci/CMakeLists.txt index b7133fa..95f7ff6 100644 --- a/sci/CMakeLists.txt +++ b/sci/CMakeLists.txt @@ -2,47 +2,35 @@ # the array . # The extension is already found. Any number of sources could be listed here. -Set(SYSTEM_INCLUDE_DIRECTORIES ${SYSTEM_INCLUDE_DIRECTORIES} ${BASE_INCLUDE_DIRECTORIES} ) - -set(INCLUDE_DIRECTORIES -#put here all directories where header files are located -${R3BROOT_SOURCE_DIR}/r3bbase -${R3BFRS_SOURCE_DIR}/frsdata -${R3BFRS_SOURCE_DIR}/sci -) - -include_directories( ${INCLUDE_DIRECTORIES}) -include_directories(SYSTEM ${SYSTEM_INCLUDE_DIRECTORIES}) - -set(LINK_DIRECTORIES ${ROOT_LIBRARY_DIR} ${FAIRROOT_LIBRARY_DIR} ) - -link_directories( ${LINK_DIRECTORIES}) - set(SRCS -FrsSciTcalPar.cxx -FrsTcalContFact.cxx -FrsSciMapped2TcalPar.cxx -FrsSciMapped2Tcal.cxx -FrsSciRawPosPar.cxx -FrsSciRawTofPar.cxx -FrsSciTcal2RawPosPar.cxx -FrsSciTcal2RawTofPar.cxx -FrsSciTcal2SingleTcal.cxx -) + FrsSciTcalPar.cxx + FrsTcalContFact.cxx + FrsSciMapped2TcalPar.cxx + FrsSciMapped2Tcal.cxx + FrsSciRawPosPar.cxx + FrsSciRawTofPar.cxx + FrsSciTcal2RawPosPar.cxx + FrsSciTcal2RawTofPar.cxx + FrsSciTcal2SingleTcal.cxx) # fill list of header files from list of source files # by exchanging the file extension -CHANGE_FILE_EXTENSION(*.cxx *.h HEADERS "${SRCS}") - -Set(LINKDEF FrsTcalLinkDef.h) -Set(LIBRARY_NAME FrsTcal) -Set(DEPENDENCIES - Base ParBase Core m) +change_file_extension(*.cxx *.h HEADERS "${SRCS}") + +add_library_with_dictionary( + LIBNAME + FrsTcal + LINKDEF + FrsTcalLinkDef.h + HEADERS + ${HEADERS} + SRCS + ${SRCS} + INCLUDEDIRS + ${CMAKE_CURRENT_SOURCE_DIR} + DEPENDENCIES + R3BFRSData) if(FAIRDB_FOUND) -set(DEPENDENCIES - ${DEPENDENCIES} FairDB) + target_link_libraries(FrsTcal PRIVATE FairDB) endif(FAIRDB_FOUND) - -GENERATE_LIBRARY() - diff --git a/wasa/CMakeLists.txt b/wasa/CMakeLists.txt index 995f992..f253174 100644 --- a/wasa/CMakeLists.txt +++ b/wasa/CMakeLists.txt @@ -2,44 +2,27 @@ # the array . # The extension is already found. Any number of sources could be listed here. -Set(SYSTEM_INCLUDE_DIRECTORIES -${SYSTEM_INCLUDE_DIRECTORIES} -${BASE_INCLUDE_DIRECTORIES} -) - -set(INCLUDE_DIRECTORIES -${R3BROOT_SOURCE_DIR}/r3bdata -${R3BROOT_SOURCE_DIR}/r3bbase -${R3BFRS_SOURCE_DIR}/frsdata -${R3BFRS_SOURCE_DIR}/frsdetectors -${R3BFRS_SOURCE_DIR}/wasa -) - -include_directories( ${INCLUDE_DIRECTORIES}) -include_directories(SYSTEM ${SYSTEM_INCLUDE_DIRECTORIES}) - -set(LINK_DIRECTORIES -${ROOT_LIBRARY_DIR} -${FAIRROOT_LIBRARY_DIR} -) - -link_directories( ${LINK_DIRECTORIES}) - set(SRCS -R3BWasaOnlineSpectra.cxx -WASATof.cxx -WASAGeoTof.cxx -WASAGeoTofPar.cxx -WASAMdc.cxx -) + R3BWasaOnlineSpectra.cxx + WASATof.cxx + WASAGeoTof.cxx + WASAGeoTofPar.cxx + WASAMdc.cxx) # fill list of header files from list of source files # by exchanging the file extension -CHANGE_FILE_EXTENSION(*.cxx *.h HEADERS "${SRCS}") - -set(LINKDEF WASALinkDef.h) -set(LIBRARY_NAME R3BWASA) -set(DEPENDENCIES - Spectrum Base FairTools R3BData R3BBase R3BFRSData) - -GENERATE_LIBRARY() +change_file_extension(*.cxx *.h HEADERS "${SRCS}") + +add_library_with_dictionary( + LIBNAME + R3BWASA + LINKDEF + WASALinkDef.h + HEADERS + ${HEADERS} + SRCS + ${SRCS} + INCLUDEDIRS + ${CMAKE_CURRENT_SOURCE_DIR} + DEPENDENCIES + R3BFRSData)