Index: /trunk/Mars/CMakeLists.txt
===================================================================
--- /trunk/Mars/CMakeLists.txt	(revision 19293)
+++ /trunk/Mars/CMakeLists.txt	(revision 19294)
@@ -56,4 +56,5 @@
 # Inlclude the main source AND build dir itself
 #SET(CMAKE_INCLUDE_CURRENT_DIR ON)
+SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/dictionary)
 
 # =========== help2man ============
@@ -110,5 +111,5 @@
 
 #IF(EXISTS "$ENV{ROOTSYS}/ROOTConfig.cmake")
-IF(DEFINED $ENV{CMAKE_PREFIX_PATH}) # -- This is supposed to be root 6 --
+IF(DEFINED ENV{CMAKE_PREFIX_PATH}) # -- This is if compiled with cmake --
    # You need to tell CMake where to find the ROOT installation. This can be done in a number of ways:
    #   - ROOT built with classic configure/make use the provided $ROOTSYS/etc/cmake/FindROOT.cmake
@@ -183,5 +184,5 @@
 	SEPARATE_ARGUMENTS(_HEADERS)
 
-        ROOT_GENERATE_DICTIONARY(dictionary/${_CINT} ${_HEADERS} ${_CINT}Incl.h LINKDEF ${_CINT}LinkDef.h OPTIONS -p)
+        ROOT_GENERATE_DICTIONARY(dictionary/${_CINT} ${_HEADERS} ${_CINT}Incl.h LINKDEF ${subdir}/${_CINT}LinkDef.h OPTIONS -p  -D__MARS__ -DHAVE_ZLIB)
 	TARGET_SOURCES(mars PRIVATE dictionary/${_CINT}.cxx ${_SRCLIST})
 
@@ -241,18 +242,17 @@
 INCLUDE_DIRECTORIES(${DIRECTORIES} mcore .)
 
-ROOT_GENERATE_DICTIONARY(dictionary/MARS
-	   factofits.h
-	   factfits.h
-	   DrsCalib.h
-	   PixelMap.h
-	   Interpolator2D.h
-	   nova.h
-	   Prediction.h
+ROOT_GENERATE_DICTIONARY(dictionary/Core
+	   mcore/factofits.h
+	   mcore/factfits.h
+	   mcore/DrsCalib.h
+	   mcore/PixelMap.h
+	   mcore/Interpolator2D.h
+	   mcore/nova.h
+	   mcore/Prediction.h
            MIncl.h
         LINKDEF MLinkDef.h
         OPTIONS -p -D__MARS__ -DHAVE_ZLIB)
 
-SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/dictionary)
-ADD_LIBRARY(mars SHARED dictionary/MARS.cxx) # CMAKE_POSITION_INDEPENDENT_CODE
+ADD_LIBRARY(mars SHARED dictionary/Core.cxx) # CMAKE_POSITION_INDEPENDENT_CODE
 TARGET_LINK_LIBRARIES(mars
         ZLIB::ZLIB
