Changeset 19715
- Timestamp:
- 10/04/19 18:47:44 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/CMakeLists.txt
r19659 r19715 93 93 94 94 FIND_PACKAGE(ZLIB REQUIRED) 95 96 # ********************************* 97 # ********** HEAL Pix ********** 98 # ********************************* 99 100 SET(HEALPIX_PREFIX "${CMAKE_SOURCE_DIR}/RootHealPix" CACHE FILEPATH "Base path to the RootHealPix code.") 101 102 IF(EXISTS ${HEALPIX_PREFIX}) 103 FIND_PACKAGE_MESSAGE(HealPixPrefix "RootHealPix prefix: ${HEALPIX_PREFIX}" "[${HEALPIX_PREFIX}]") 104 SET(FOUND_HEALPIX ON) 105 ENDIF() 95 106 96 107 # ============== ROOT ================ … … 112 123 SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "$ENV{ROOTSYS}/etc/cmake") 113 124 125 SET(ROOT_PACKAGES Gui Minuit ASImage HistPainter) 126 IF(FOUND_HEALPIX) 127 SET(ROOT_PACKAGES ${ROOT_PACKAGES} FITSIO) 128 ENDIF() 129 114 130 #---Locate the ROOT package and defines a number of variables (e.g. ROOT_INCLUDE_DIRS) 115 FIND_PACKAGE(ROOT REQUIRED COMPONENTS Gui Minuit ASImage HistPainter)131 FIND_PACKAGE(ROOT REQUIRED COMPONENTS ${ROOT_PACKAGES}) 116 132 117 133 IF(NOT DEFINED ROOT_CONFIG_EXECUTABLE) … … 291 307 292 308 ADD_LIBRARY(mars SHARED dictionary/Core.cxx) # CMAKE_POSITION_INDEPENDENT_CODE 293 SET_SOURCE_FILES_PROPERTIES(dictionary/Core.cxx PROPERTIES COMPILE_FLAGS "-Wno-deprecated-register") 309 SET_SOURCE_FILES_PROPERTIES(dictionary/Core.cxx PROPERTIES COMPILE_FLAGS "-Wno-deprecated-register") 310 294 311 TARGET_LINK_LIBRARIES(mars 295 312 ZLIB::ZLIB … … 308 325 SRCFILES(${DIR}) 309 326 ENDFOREACH() 327 328 # ------------------------------------------------------- 329 330 IF(FOUND_HEALPIX) 331 # https://github.com/akira-okumura/RootHealPix.git 332 # THealPixD de("name", "", 2); for (int i=0; i<100; i++) de.Fill(gRandom->Uniform()*90, gRandom->Uniform()*180); de.Draw("COLZ"); 333 334 # INCLUDE_DIRECTORIES(${HEALPIX_PREFIX}/include) 335 # - The first one is required to make ROOT_GENERATE_DICTIONARY 336 # find absolute paths. The second one is required for 337 # compilation. Note that any later ROOT_GENERALE_DICTIONARY 338 # might find the LinkDef.h in RootHealPix/include 339 INCLUDE_DIRECTORIES(/ ${HEALPIX_PREFIX}/include) 340 341 ROOT_GENERATE_DICTIONARY(dictionary/HealPix 342 ${HEALPIX_PREFIX}/include/Healoption.h 343 ${HEALPIX_PREFIX}/include/THealAlm.h 344 ${HEALPIX_PREFIX}/include/THealFFT.h 345 ${HEALPIX_PREFIX}/include/THealPainter.h 346 ${HEALPIX_PREFIX}/include/THealPaletteAxis.h 347 ${HEALPIX_PREFIX}/include/THealPixCube.h 348 ${HEALPIX_PREFIX}/include/THealPix.h 349 ${HEALPIX_PREFIX}/include/THealUtil.h 350 ${HEALPIX_PREFIX}/include/TVirtualHealPainter.h 351 LINKDEF ${HEALPIX_PREFIX}/include/LinkDef.h OPTIONS -p) 352 353 # - Define the source files of the library 354 ADD_LIBRARY(RootHealPix SHARED dictionary/HealPix.cxx 355 ${HEALPIX_PREFIX}/src/THealAlm.cxx 356 ${HEALPIX_PREFIX}/src/THealFFT.cxx 357 ${HEALPIX_PREFIX}/src/THealPainter.cxx 358 ${HEALPIX_PREFIX}/src/THealPaletteAxis.cxx 359 ${HEALPIX_PREFIX}/src/THealPixCube.cxx 360 ${HEALPIX_PREFIX}/src/THealPix.cxx 361 ${HEALPIX_PREFIX}/src/THealUtil.cxx 362 ${HEALPIX_PREFIX}/src/TVirtualHealPainter.cxx) 363 364 # - Tweak some warnings 365 SET_TARGET_PROPERTIES(RootHealPix PROPERTIES COMPILE_FLAGS 366 "-Wno-unused-variable -Wno-unused-function -Wno-unneeded-internal-declaration -Wno-shadow") 367 368 # - Link with the root libraries for auto-loading 369 TARGET_LINK_LIBRARIES(mars RootHealPix) 370 371 # - Install the corresponding header files 372 INSTALL(DIRECTORY ${HEALPIX_PREFIX}/include/ DESTINATION "include" FILES_MATCHING PATTERN "*.h") 373 374 # - Install the library 375 INSTALL(TARGETS RootHealPix DESTINATION ".") 376 ENDIF() 377 310 378 311 379 # rootlogon.C finds the shared object only if the libmars.so is in the same directory than the dictionary files
Note:
See TracChangeset
for help on using the changeset viewer.