Commit 812e1941 authored by Jan Möbius's avatar Jan Möbius

Enable qwt support for mac os. refs #441

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@13773 383ad7c9-94d9-4d36-a494-682f7c89f535
parent deb6f032
......@@ -43,11 +43,9 @@ set(INCLUDE_DIRS ${OPENMESH_INCLUDE_DIR}
set(ADDITIONAL_LINK_LIBRARIES "" )
if (NOT APPLE)
find_package(Qwt5)
endif ()
find_package(Qwt5)
if(NOT APPLE AND Qwt5_Qt4_FOUND)
if(Qwt5_Qt4_FOUND)
add_definitions(-DWITH_QWT)
set(INCLUDE_DIRS ${INCLUDE_DIRS} ${Qwt5_INCLUDE_DIR} )
set(ADDITIONAL_LINK_LIBRARIES ${ADDITIONAL_LINK_LIBRARIES} ${Qwt5_Qt4_LIBRARY})
......
......@@ -129,11 +129,9 @@ if ( NOT found EQUAL -1 )
endif()
endif()
if (NOT APPLE)
find_package(Qwt5)
endif ()
find_package(Qwt5)
if(NOT APPLE AND Qwt5_Qt4_FOUND)
if(Qwt5_Qt4_FOUND)
add_definitions(-DWITH_QWT)
set(COREAPP_ADDITIONAL_LINK_LIBRARIES ${COREAPP_ADDITIONAL_LINK_LIBRARIES} ${Qwt5_Qt4_LIBRARY})
endif()
......
include(plugin)
macro (of_list_filter _list)
if (APPLE OR NOT Qwt5_Qt4_FOUND)
foreach (_element ${${_list}})
if (_element MATCHES "QwtFunctionPlot.*\\.(cc|hh|ui)$")
list (REMOVE_ITEM ${_list} ${_element})
endif ()
endforeach ()
endif ()
endmacro ()
find_package(Qwt5)
if (NOT APPLE)
find_package(Qwt5)
endif ()
if(NOT APPLE AND Qwt5_Qt4_FOUND)
if(Qwt5_Qt4_FOUND)
message("a")
add_definitions(-DWITH_QWT)
openflipper_plugin(INCDIRS ${Qwt5_INCLUDE_DIR} LIBRARIES ${Qwt5_Qt4_LIBRARY})
else()
......
......@@ -33,14 +33,15 @@ IF( QT4_FOUND )
PATHS ${QT_INCLUDE_DIR}
/usr/local/qwt/include
/usr/local/include
/usr/include/qwt
/opt/local/include
/usr/include
/usr/include
c:\\libs\\Qwt-6.0.1
c:\\Program\ Files\\qwt\\qwt-5.2.0
c:\\qwt-5.2.0
C:\\libs\\qwt-5.2.0
PATH_SUFFIXES qwt qwt5 qwt-qt4 qwt5-qt4 qwt-qt3 qwt5-qt3 include qwt/include qwt5/include qwt-qt4/include qwt5-qt4/include qwt-qt3/include qwt5-qt3/include ENV PATH)
# Find Qwt version
IF( Qwt5_INCLUDE_DIR )
FILE( READ ${Qwt5_INCLUDE_DIR}/qwt_global.h QWT_GLOBAL_H )
......@@ -51,7 +52,7 @@ IF( QT4_FOUND )
IF( NOT WIN32 )
# Find Qwt5 library linked to Qt4
FIND_LIBRARY( Qwt5_Qt4_TENTATIVE_LIBRARY NAMES qwt5-qt4 qwt-qt4 qwt5 qwt PATHS /usr/local/qwt/lib /usr/local/lib /usr/lib )
FIND_LIBRARY( Qwt5_Qt4_TENTATIVE_LIBRARY NAMES qwt5-qt4 qwt-qt4 qwt5 qwt PATHS /usr/local/qwt/lib /opt/local/lib /usr/local/lib /usr/lib )
get_filename_component(_Qwt5_Qt4_LIBRARY_DIR ${Qwt5_Qt4_TENTATIVE_LIBRARY} PATH)
set ( Qwt5_Qt4_LIBRARY_DIR ${_Qwt5_Qt4_LIBRARY_DIR} CACHE FILEPATH "Library dir of qwt" )
ELSE( NOT WIN32)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment