IAP GITLAB

CMakeLists.txt 1010 Bytes
Newer Older
Tanguy Pierog's avatar
Tanguy Pierog committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
INCLUDE_DIRECTORIES ("${PROJECT_SOURCE_DIR}/src/dpmjet/3.2019-1")
FILE(GLOB files dpmjet_epos.f ../../crmc-aaa.f ../../models.F)
FILE(GLOB filesDum DPMJET-19.1/common/*.f)
FILE(GLOB filesDpm DPMJET-19.1/src/dpmjet/*.f)
FILE(GLOB filesPho DPMJET-19.1/src/phojet/*.f)
FILE(GLOB filesPyt DPMJET-19.1/src/pythia/*.f)
include_directories(DPMJET-19.1/include/dpmjet DPMJET-19.1/include/phojet DPMJET-19.1/include/pythia DPMJET-19.1/include/flinclude)
set_source_files_properties( ${filesPho} ${filesPyt} ${filesDpm} ${filesDum} ${files}  PROPERTIES COMPILE_FLAGS "-xf77-cpp-input -D __DPMJET__")

IF (__CRMCSTATIC__)
add_library(Dpmjet19 STATIC ${filesPho} ${filesPyt} ${filesDpm} ${filesDum} ${files})
ELSE (__CRMCSTATIC__)
add_library(Dpmjet19 SHARED ${filesPho} ${filesPyt} ${filesDpm} ${filesDum} ${files})
target_link_libraries(Dpmjet19 CrmcBasic)
ENDIF (__CRMCSTATIC__)

INSTALL (TARGETS Dpmjet19
        RUNTIME DESTINATION bin
        LIBRARY DESTINATION lib
        ARCHIVE DESTINATION lib/static
        )