Changeset 2830 for trunk/CMakeLists.txt


Ignore:
Timestamp:
07/31/13 17:37:40 (11 years ago)
Author:
WataruKawasaki
Message:

New Development: Yes

JIRA Issue: Yes (CAS-3620)

Ready for Test: Yes

Interface Changes: No

What Interface Changed:

Test Programs:

Put in Release Notes: Yes

Module(s): sd

Description: a new simple plotter based on PGPLOT. the module name is sd.plotter2. only available on casapy (unavailable in the standalone ASAP)


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CMakeLists.txt

    r2587 r2830  
    418418message( STATUS "BOOST_INCLUDE_DIR = " ${Boost_INCLUDE_DIR} )
    419419message( STATUS "BOOST_LIBRARIES = " ${Boost_LIBRARIES} )
    420 
    421 
    422 #
    423 # Qt4   4.3.4 or later
    424 #
    425 find_package( Qt4 4.3.4
    426               COMPONENTS QtCore QtGui )
    427 if( NOT QT4_FOUND )
    428   message( FATAL_ERROR "Qt4 could not be found. Please check!" )
    429 endif()
    430 set( QT4_INCLUDE_DIRS ${QT_INCLUDES} CACHE PATH "QT4 include directories" FORCE )
    431 set( QT4_DEFINITIONS ${QT_DEFINITIONS} -DQT_NO_DEBUG CACHE STRING "QT4 preprocessor flags" FORCE )
    432 set( QT4_LIBRARIES
    433   ${QT_QTCORE_LIBRARY}
    434   ${QT_QTGUI_LIBRARY}
    435   CACHE FILEPATH "QT4 libraries" FORCE )
    436 list( REMOVE_ITEM QT4_LIBRARIES "optimized" )
    437 list( REMOVE_ITEM QT4_LIBRARIES "debug" )
    438 message( STATUS "QT4_INCLUDE_DIRS = " ${QT4_INCLUDE_DIRS} )
    439 message( STATUS "QT4_DEFINITIONS = " ${QT4_DEFINITIONS} )
    440 message( STATUS "QT4_LIBRARIES = " ${QT4_LIBRARIES} )
    441420
    442421
     
    527506endif()
    528507
     508# X11.
     509if( NOT APPLE )
     510  find_package( X11 REQUIRED )
     511  # Rename
     512  set( X11_INCLUDE_DIRS ${X11_INCLUDE_DIR} )
     513endif()
     514
     515# PGPLOT (FORTRAN plotting package).
     516# depends on X11
     517if( STANDALONE )
     518  ############
     519  find_path( PGPLOT_INCLUDE_DIRS cpgplot.h
     520             PATHS /usr
     521             PATH_SUFFIXES include )
     522  if( PGPLOT_INCLUDE_DIRS MATCHES "NOTFOUND$" )
     523    message( FATAL ERROR "cpgplot.h could not be found. Please check!" )
     524  endif()
     525  find_library( CPGPLOT_LIB libcpgplot.${SO}
     526                PATHS /usr
     527                PATH_SUFFIXES lib64 lib )
     528  if( CPGPLOT_LIB MATCHES "NOTFOUND$" )
     529    message( FATAL ERROR "libcpgplot could not be found. Please check!" )
     530  endif()
     531  find_library( PGPLOT_LIB libpgplot.${SO}
     532                PATHS /usr
     533                PATH_SUFFIXES lib64 lib )
     534  if( PGPLOT_LIB MATCHES "NOTFOUND$" )
     535    message( FATAL ERROR "libpgplot could not be found. Please check!" )
     536  endif()
     537  set( PGPLOT_LIBRARIES "${CPGPLOT_LIB} ${PGPLOT_LIB} ${X11_LIBRARIES} ${FORTRAN_LIBRARIES} " )
     538  ############
     539else()
     540  if( APPLE )
     541    set( _deps FORTRAN )
     542  else()
     543    set( _deps X11 FORTRAN )
     544  endif()
     545  if (CMAKE_SYSTEM MATCHES ^Darwin-11 AND NOT LLVMCOMPILER )
     546     set( CMAKE_SHARED_LINKER_FLAGS "-Wl,-undefined -Wl,error -framework AppKit -lgfortran" )
     547  else()
     548     if (APPLE)
     549        set( CMAKE_SHARED_LINKER_FLAGS "-Wl,-undefined -Wl,error -framework AppKit" )
     550     else()
     551        set( CMAKE_SHARED_LINKER_FLAGS "-Wl,-undefined -Wl,error" )
     552     endif()
     553  endif()
     554  casa_find( PGPLOT
     555    VERSION 5.3.1
     556    PREFIX_HINTS ${PGPLOT_ROOT_DIR}
     557    INCLUDES cpgplot.h
     558    LIBS pgplot${pgplot_ext} cpgplot${pgplot_ext}
     559    DEPENDS ${_deps} )
     560endif()
    529561
    530562#
     
    593625include_directories( ${CASACORE_INCLUDE_DIR}
    594626                     ${Boost_INCLUDE_DIR}
    595                      ${QT4_INCLUDE_DIRS}
     627                     ${X11_INCLUDE_DIRS}
     628                     ${PGPLOT_INCLUDE_DIRS}
    596629                     ${PYTHON_INCLUDE_DIRS}
    597630                     ${WCSLIB_INCLUDE_DIR}
Note: See TracChangeset for help on using the changeset viewer.