Changeset 20009 for trunk/Mars


Ignore:
Timestamp:
12/21/20 15:10:29 (4 years ago)
Author:
tbretz
Message:
Allow compilation also without libnova support.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/CMakeLists.txt

    r19990 r20009  
    105105# handle success
    106106FIND_PACKAGE_MESSAGE(NovaInc "Found Nova headers in ${NOVA_INCLUDE_DIR}" "[${NOVA_LIBRARY}][${NOVA_INCLUDE_DIR}]")
     107
     108IF(NOT NOVA_FOUND)
     109     MESSAGE(WARNING "You are compiling without support for libnova!")
     110ENDIF()
    107111
    108112
     
    387391INCLUDE_DIRECTORIES(${DIRECTORIES} mcore .)
    388392
    389 ROOT_GENERATE_DICTIONARY(dictionary/Core
    390            mcore/factofits.h
    391            mcore/factfits.h
    392            mcore/DrsCalib.h
    393            mcore/PixelMap.h
    394            mcore/Interpolator2D.h
    395            mcore/nova.h
    396            mcore/Prediction.h
    397            MIncl.h
     393IF(NOVA_FOUND)
     394   INCLUDE_DIRECTORIES(${NOVA_INCLUDE_DIR})
     395ENDIF()
     396
     397
     398SET(CORE_HEADERS
     399        mcore/factofits.h
     400        mcore/factfits.h
     401        mcore/DrsCalib.h
     402        mcore/PixelMap.h
     403        mcore/Interpolator2D.h
     404        MIncl.h)
     405
     406IF(NOVA_FOUND)
     407    LIST(APPEND CORE_HEADERS mcore/nova.h mcore/Prediction.h)
     408ENDIF()
     409
     410ROOT_GENERATE_DICTIONARY(dictionary/Core ${CORE_HEADERS} MIncl.h
    398411        LINKDEF MLinkDef.h
    399412        OPTIONS -p -D__MARS__ -DHAVE_ZLIB)
     
    414427
    415428
    416 TARGET_LINK_LIBRARIES(mars
    417         ZLIB::ZLIB
    418         ${NOVA_LIBRARY}
    419         ${ROOT_LIBRARIES})
     429TARGET_LINK_LIBRARIES(mars ZLIB::ZLIB ${ROOT_LIBRARIES})
     430IF(NOVA_FOUND)
     431   TARGET_LINK_LIBRARIES(mars ${NOVA_LIBRARY})
     432ENDIF()
    420433
    421434ADD_EXECUTABLE(showplot showplot.cc)
Note: See TracChangeset for help on using the changeset viewer.