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

Revision 12292, 1.4 kB (checked in by robert, 4 years ago)

Ran svn propset -R svn:eol-style native . on the OpenSceneGraph

  • 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
15QT4_WRAP_CPP( SOURCES_H_MOC ${SOURCES_H} OPTIONS "-f" )
16
17SET(TARGET_H
18    ${HEADER_PATH}/Export
19    ${HEADER_PATH}/GraphicsWindowQt
20    ${HEADER_PATH}/QFontImplementation
21    ${HEADER_PATH}/QGraphicsViewAdapter
22    ${HEADER_PATH}/QWidgetImage
23    ${HEADER_PATH}/QWebViewImage
24)
25
26
27# FIXME: For OS X, need flag for Framework or dylib
28SET(TARGET_SRC
29    GraphicsWindowQt.cpp
30    QFontImplementation.cpp
31    QGraphicsViewAdapter.cpp
32    QWidgetImage.cpp
33    ${SOURCES_H_MOC}
34    ${OPENSCENEGRAPH_VERSIONINFO_RC}
35)
36
37SET(TARGET_LIBRARIES
38    osgWidget
39    osgDB
40    osgUtil
41    osg
42    OpenThreads
43)
44
45IF(CMAKE_COMPILER_IS_GNUCXX)
46    # Remove -pedantic flag as it barfs on Qt headers
47   STRING(REGEX REPLACE "-pedantic" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
48ENDIF()
49
50SET(TARGET_LIBRARIES
51    ${TARGET_LIBRARIES}
52    ${QT_QTCORE_LIBRARY}
53    ${QT_QTGUI_LIBRARY}
54    ${QT_QTOPENGL_LIBRARY}
55)
56
57# FIXME: This should work but something with the LINK_WITH_VARIABLES macro is not working
58#SET(TARGET_LIBRARIES_VARS
59#    QT_QTCORE_LIBRARY
60#    QT_QTGUI_LIBRARY
61#    QT_QTOPENGL_LIBRARY
62#)
63INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR})
64
65SETUP_LIBRARY(${LIB_NAME})
66
Note: See TracBrowser for help on using the browser.