Warning, /geant4/examples/extended/medical/DICOM/DICOM2/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001
0002 #----------------------------------------------------------------------------
0003 # Setup the project
0004 cmake_minimum_required(VERSION 3.16...3.27)
0005 project(DICOM2)
0006
0007 #----------------------------------------------------------------------------
0008 # Locate sources and headers for this project
0009 # NB: headers are included so they will show up in IDEs
0010 #
0011 file(GLOB sources ${PROJECT_SOURCE_DIR}/src/*.cc)
0012 file(GLOB headers ${PROJECT_SOURCE_DIR}/include/*.hh)
0013
0014 #----------------------------------------------------------------------------
0015 # Add the executable, and link it to the Geant4 libraries
0016 #
0017 add_executable(dicom2 dicom2.cc ${sources} ${headers})
0018 target_include_directories(dicom2 PRIVATE ${PROJECT_SOURCE_DIR}/include)
0019 target_link_libraries(dicom2 PRIVATE G4DicomCore::G4DicomCore ${Geant4_LIBRARIES})
0020
0021 #----------------------------------------------------------------------------
0022 # Copy all scripts to the build directory, i.e. the directory in which we
0023 # build B1. This is so that we can run the executable directly because it
0024 # relies on these scripts being in the current working directory.
0025 #
0026 # the macros
0027 set(DICOM_MACROS run.mac vis.mac)
0028
0029 # original set of DICOM data
0030 set(DICOM_SCRIPTS
0031 1.dcm 2.dcm 3.dcm
0032 1.g4 2.g4 3.g4
0033 1.g4dcm 2.g4dcm 3.g4dcm
0034 ColourMap.dat CT2Density.dat
0035 Data.dat.new Data.dat.old
0036 Data.dat.new_dens Data.partial.dat)
0037
0038 foreach(_script ${DICOM_SCRIPTS})
0039 configure_file(
0040 ${PROJECT_SOURCE_DIR}/data/${_script}
0041 ${PROJECT_BINARY_DIR}/${_script}
0042 COPYONLY)
0043 endforeach()
0044
0045 if(DICOM_USE_DCMTK)
0046 configure_file(${PROJECT_SOURCE_DIR}/data/Data.dat.new
0047 ${PROJECT_BINARY_DIR}/Data.dat COPYONLY)
0048 else()
0049 configure_file(${PROJECT_SOURCE_DIR}/data/Data.dat.old
0050 ${PROJECT_BINARY_DIR}/Data.dat COPYONLY)
0051 endif()
0052
0053 foreach(_script ${DICOM_MACROS})
0054 configure_file(
0055 ${PROJECT_SOURCE_DIR}/${_script}
0056 ${PROJECT_BINARY_DIR}/${_script}
0057 COPYONLY)
0058 endforeach()