set(FilesWithClassDef JAHRS.hh JAHRSCalibration.hh JAHRSDetectorCalibration.hh JAllParams.hh JCLBID.hh JCLBMap.hh JCalibration.hh JDBString.hh JDatalog.hh JDatalogNumbers.hh JDatim_t.hh JDetCalibrations.hh JDetectorIntegration.hh JDetectors.hh JMACAddress.hh JPBS_t.hh JPMTBestHVSettings.hh JPMTHVRunSettings.hh JPMTHVSettings.hh JPersons.hh JProductIntegration.hh JRunCalibration.hh JRunQuality.hh JRunSummaryNumbers.hh JRuns.hh JRunsetupParams.hh JToAshort.hh JUPI.hh JUPI_t.hh JVendorHV.hh) list(TRANSFORM FilesWithClassDef PREPEND ${CMAKE_CURRENT_SOURCE_DIR}/ OUTPUT_VARIABLE AbsFilesWithClassDef) add_executable(classdef2code) target_sources(classdef2code PRIVATE codegen/classdef2code.cc) # special addition for gcc-8 target_link_libraries(classdef2code "$<$,$,9.0>>:-lstdc++fs>" ) add_custom_command(OUTPUT JDBTypes.hh COMMAND classdef2code JDBTypes.hh types ${AbsFilesWithClassDef} DEPENDS ${AbsFilesWithClassDef} codegen/classdef2code.cc ) add_custom_command(OUTPUT JDBincludes.hh COMMAND classdef2code JDBincludes.hh includes ${AbsFilesWithClassDef} DEPENDS ${AbsFilesWithClassDef} codegen/classdef2code.cc ) jpp_add_library(JDB SOURCES JDBSupportkit.cc JDBToolkit.cc JRunQuality.cc JDBTypes.hh JDBincludes.hh PUBLIC_LINK_LIBRARIES km3net::JROOT km3net::JJSON km3net::dbclient ROOT_DICTIONARY ${FilesWithClassDef} PUBLIC_INCLUDE_DIRECTORIES ${PROJECT_BINARY_DIR}/software ${CMAKE_CURRENT_SOURCE_DIR} ${PROJECT_SOURCE_DIR}/software ) # exe with simple dependency on JDB foreach(exe JAHRSCalibration JAsciiDB JConvertDB JDatalogString JFileTuna JPMTTTS JPMTThreshold JPrintAHRSCalibration JPrintDB JPrintPMTThreshold JPrintTuna JRootDB JRuns JServerDB JTDC JTestTuna JTuna JTuna2Graph getAPIV2 getCookie getDetector getLocationID getTimestamp ) jpp_add_executable(${exe} SOURCES ${exe}.cc LINK_LIBRARIES km3net::JDB km3net::dataformat km3net::Jeep) endforeach() # exe with extra dep on JDetector # or should we simply add JDetector to the deps on JDB ? # (not a good idea ?) foreach(exe JDetectorDB JPMTSwapDB JRunCalibration JSonDetector ) jpp_add_executable(${exe} SOURCES ${exe}.cc LINK_LIBRARIES km3net::JDB km3net::JDetector km3net::Jeep) endforeach() jpp_auto_add_scripts()