Commit 2a6c6773 authored by Whitney Armstrong's avatar Whitney Armstrong
Browse files

Added proper library check for npdet_to_step

	modified:   CMakeLists.txt
	modified:   src/npdet_to_step.cxx
parent 76056ca3
......@@ -10,25 +10,34 @@ find_package( DD4hep REQUIRED COMPONENTS DDCore DDG4 )
find_package(ROOT REQUIRED COMPONENTS Geom GenVector MathCore)
include(${ROOT_USE_FILE})
set(exe_name npdet_to_step)
set(exe_name npdet_fields)
add_executable(${exe_name} src/${exe_name}.cxx)
target_include_directories(${exe_name} PUBLIC
PRIVATE include
)
PRIVATE include )
target_compile_features(${exe_name}
PUBLIC cxx_auto_type
PUBLIC cxx_trailing_return_types
PRIVATE cxx_variadic_templates )
target_link_libraries(${exe_name} PUBLIC DDCore DDG4 ROOT::Core ROOT::Hist ROOT::GenVector ROOT::Gpad)
install(TARGETS ${exe_name}
EXPORT NPDetTargets
RUNTIME DESTINATION bin )
# npdet_to_step needs ROOT's GeoCad library
if(TARGET ROOT::GeoCad)
set(exe_name npdet_to_step)
add_executable(${exe_name} src/${exe_name}.cxx)
target_include_directories(${exe_name} PUBLIC
PRIVATE include )
target_compile_features(${exe_name}
PUBLIC cxx_auto_type
PUBLIC cxx_trailing_return_types
PRIVATE cxx_variadic_templates
)
PRIVATE cxx_variadic_templates )
target_link_libraries(${exe_name} PUBLIC DDCore DDG4 ROOT::Core ROOT::Hist ROOT::GenVector ROOT::Gpad ROOT::GeoCad)
install(TARGETS ${exe_name}
install(TARGETS ${exe_name}
EXPORT NPDetTargets
RUNTIME DESTINATION bin
)
RUNTIME DESTINATION bin )
endif(TARGET ROOT::GeoCad)
......@@ -161,9 +161,8 @@ int main (int argc, char *argv[]) {
detector.fromCompact(s.infile);
TGeoToStep * mygeom= new TGeoToStep( &(detector.manager()) );
//mygeom->CreateGeometry();
detector.manager().Export("geometry.gdml");
mygeom->CreateGeometry();
//detector.manager().Export("geometry.gdml");
std::cout << "saved as geometry.stp\n";
return 0;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment