root/OpenSceneGraph/trunk/src/osgQt/CMakeLists.txt @ 13482

Revision 13482, 1.7 kB (checked in by robert, 10 hours ago)

Added VolumeSettings::Filename property.

  • Property svn:eol-style set to native
Line 
1
2IF(DYNAMIC_OPENSCENEGRAPH)
3    ADD_DEFINITIONS(-DOSGQT_LIBRARY)
4ELSE()
5    ADD_DEFINITIONS(-DOSG_LIBRARY_STATIC)
6ENDIF()
7
8SET(LIB_NAME osgQt)
9SET(HEADER_PATH ${OpenSceneGraph_SOURCE_DIR}/include/${LIB_NAME})
10
11SET(SOURCES_H
12    ${HEADER_PATH}/QGraphicsViewAdapter
13)
14
15IF ( Qt5Widgets_FOUND )
16    QT5_WRAP_CPP( SOURCES_H_MOC ${SOURCES_H} OPTIONS "-f" )
17ELSE()
18    QT4_WRAP_CPP( SOURCES_H_MOC ${SOURCES_H} OPTIONS "-f" )
19ENDIF()
20
21SET(TARGET_H
22    ${HEADER_PATH}/Export
23    ${HEADER_PATH}/GraphicsWindowQt
24    ${HEADER_PATH}/QFontImplementation
25    ${HEADER_PATH}/QGraphicsViewAdapter
26    ${HEADER_PATH}/QWidgetImage
27    ${HEADER_PATH}/QWebViewImage
28)
29
30
31# FIXME: For OS X, need flag for Framework or dylib
32SET(TARGET_SRC
33    GraphicsWindowQt.cpp
34    QFontImplementation.cpp
35    QGraphicsViewAdapter.cpp
36    QWidgetImage.cpp
37    ${SOURCES_H_MOC}
38    ${OPENSCENEGRAPH_VERSIONINFO_RC}
39)
40
41SET(TARGET_LIBRARIES
42    osgWidget
43    osgDB
44    osgUtil
45    osg
46    OpenThreads
47)
48
49IF(CMAKE_COMPILER_IS_GNUCXX)
50    # Remove -pedantic flag as it barfs on Qt headers
51   STRING(REGEX REPLACE "-pedantic" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
52ENDIF()
53
54# FIXME: This should work but something with the LINK_WITH_VARIABLES macro is not working
55#SET(TARGET_LIBRARIES_VARS
56#    QT_QTCORE_LIBRARY
57#    QT_QTGUI_LIBRARY
58#    QT_QTOPENGL_LIBRARY
59#)
60
61IF( QT4_FOUND )
62    INCLUDE_DIRECTORIES( ${QT_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR}
63             ${QT_QTOPENGL_INCLUDE_DIR} )
64    SET(TARGET_LIBRARIES
65    ${TARGET_LIBRARIES}
66    ${QT_QTCORE_LIBRARY}
67    ${QT_QTGUI_LIBRARY}
68    ${QT_QTOPENGL_LIBRARY}
69)
70
71ENDIF( QT4_FOUND )
72
73SETUP_LIBRARY(${LIB_NAME})
74
75IF ( Qt5Widgets_FOUND )
76    qt5_use_modules( ${LIB_NAME} Widgets OpenGL )
77ENDIF ( Qt5Widgets_FOUND )
Note: See TracBrowser for help on using the browser.