Changeset 19294


Ignore:
Timestamp:
10/24/18 21:02:25 (6 years ago)
Author:
tbretz
Message:
In this context $ ENV should be just ENV, the subdir must be specified, to avoid confusion renamed libMARS to libCore, the LIBARARY OUTPUT DIRECTORY must be set before the first ROOT_GENERATE_DICTIONARY
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/CMakeLists.txt

    r19287 r19294  
    5656# Inlclude the main source AND build dir itself
    5757#SET(CMAKE_INCLUDE_CURRENT_DIR ON)
     58SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/dictionary)
    5859
    5960# =========== help2man ============
     
    110111
    111112#IF(EXISTS "$ENV{ROOTSYS}/ROOTConfig.cmake")
    112 IF(DEFINED $ENV{CMAKE_PREFIX_PATH}) # -- This is supposed to be root 6 --
     113IF(DEFINED ENV{CMAKE_PREFIX_PATH}) # -- This is if compiled with cmake --
    113114   # You need to tell CMake where to find the ROOT installation. This can be done in a number of ways:
    114115   #   - ROOT built with classic configure/make use the provided $ROOTSYS/etc/cmake/FindROOT.cmake
     
    183184        SEPARATE_ARGUMENTS(_HEADERS)
    184185
    185         ROOT_GENERATE_DICTIONARY(dictionary/${_CINT} ${_HEADERS} ${_CINT}Incl.h LINKDEF ${_CINT}LinkDef.h OPTIONS -p)
     186        ROOT_GENERATE_DICTIONARY(dictionary/${_CINT} ${_HEADERS} ${_CINT}Incl.h LINKDEF ${subdir}/${_CINT}LinkDef.h OPTIONS -p  -D__MARS__ -DHAVE_ZLIB)
    186187        TARGET_SOURCES(mars PRIVATE dictionary/${_CINT}.cxx ${_SRCLIST})
    187188
     
    241242INCLUDE_DIRECTORIES(${DIRECTORIES} mcore .)
    242243
    243 ROOT_GENERATE_DICTIONARY(dictionary/MARS
    244            factofits.h
    245            factfits.h
    246            DrsCalib.h
    247            PixelMap.h
    248            Interpolator2D.h
    249            nova.h
    250            Prediction.h
     244ROOT_GENERATE_DICTIONARY(dictionary/Core
     245           mcore/factofits.h
     246           mcore/factfits.h
     247           mcore/DrsCalib.h
     248           mcore/PixelMap.h
     249           mcore/Interpolator2D.h
     250           mcore/nova.h
     251           mcore/Prediction.h
    251252           MIncl.h
    252253        LINKDEF MLinkDef.h
    253254        OPTIONS -p -D__MARS__ -DHAVE_ZLIB)
    254255
    255 SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/dictionary)
    256 ADD_LIBRARY(mars SHARED dictionary/MARS.cxx) # CMAKE_POSITION_INDEPENDENT_CODE
     256ADD_LIBRARY(mars SHARED dictionary/Core.cxx) # CMAKE_POSITION_INDEPENDENT_CODE
    257257TARGET_LINK_LIBRARIES(mars
    258258        ZLIB::ZLIB
Note: See TracChangeset for help on using the changeset viewer.