# Create a library called "libBase" which includes the source files given in # the array . # The extension is already found. Any number of sources could be listed here. set(INCLUDE_DIRECTORIES ${ROOT_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/base/include ) include_directories( ${INCLUDE_DIRECTORIES}) set(LINK_DIRECTORIES ${ROOT_LIBRARY_DIR} ) link_directories( ${LINK_DIRECTORIES}) set(ALL_exe ampt2u evtgen2u hijing2u hsd2u pluto2u urqmd2u venus2u) foreach(program ${ALL_exe}) add_executable(${program} ${program}.cpp) set_target_properties(${program} PROPERTIES OUTPUT_NAME ${program}) # set_target_properties(${program} PROPERTIES LINK_FLAGS "-fPIC") # set_target_properties(${program} PROPERTIES LINKER_LANGUAGE "Fortran") target_link_libraries(${program} ${ROOT_LIBRARIES} UniGen) Install(TARGETS ${program} DESTINATION ${INSTALL_DIR}/bin) endforeach(program)