ResInsight/Fwk/AppFwk/cafViewer/CMakeLists.txt

83 lines
1.6 KiB
CMake
Raw Normal View History

cmake_minimum_required (VERSION 2.8.12)
project (cafViewer)
# Qt
option(CEE_USE_QT5 "Use Qt5" OFF)
if (CEE_USE_QT5)
find_package(Qt5Core CONFIG QUIET)
endif(CEE_USE_QT5)
if (Qt5Core_FOUND)
find_package(Qt5 CONFIG REQUIRED Core Gui Widgets OpenGL)
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets Qt5::OpenGL)
else()
find_package(Qt4 COMPONENTS QtCore QtGui QtMain QtOpenGl REQUIRED)
include(${QT_USE_FILE})
endif(Qt5Core_FOUND)
# These headers need to go through Qt's MOC compiler
set( MOC_HEADER_FILES
cafViewer.h
)
if ( NOT CMAKE_AUTOMOC )
if (CEE_USE_QT5)
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES} )
else()
qt4_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES} )
endif(CEE_USE_QT5)
endif()
add_library( ${PROJECT_NAME}
cafCadNavigation.cpp
cafCadNavigation.h
cafCeetronNavigation.cpp
cafCeetronNavigation.h
2013-10-19 17:41:25 -05:00
cafCeetronPlusNavigation.cpp
cafCeetronPlusNavigation.h
cafTrackBallBasedNavigation.cpp
cafTrackBallBasedNavigation.h
cafNavigationPolicy.cpp
cafNavigationPolicy.h
cafOpenGLWidget.cpp
cafOpenGLWidget.h
cafViewer.cpp
cafViewer.h
${MOC_SOURCE_FILES}
)
target_include_directories(${PROJECT_NAME}
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)
target_link_libraries ( ${PROJECT_NAME}
LibCore
LibGeometry
LibViewing
LibRender
LibGuiQt
cafAnimControl
${QT_LIBRARIES}
)
2018-09-27 14:27:34 -05:00
if (MSVC)
set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/W4 /wd4100 /wd4127")
endif()
source_group("" FILES ${PROJECT_FILES})
2019-01-31 23:56:11 -06:00
# cotire
if (COMMAND caf_apply_cotire)
list(APPEND CAF_COTIRE_EXCLUDE_FILES
cafOpenGLWidget.cpp
)
caf_apply_cotire("${PROJECT_NAME}")
2019-01-31 23:56:11 -06:00
endif()