2018-02-27 10:20:46 -06:00
|
|
|
cmake_minimum_required (VERSION 2.8.12)
|
2012-05-18 02:45:23 -05:00
|
|
|
|
|
|
|
project (cafViewer)
|
|
|
|
|
2020-01-23 06:37:29 -06:00
|
|
|
# Unity Build
|
|
|
|
if (CAF_ENABLE_UNITY_BUILD)
|
|
|
|
message("Cmake Unity build is enabled on : ${PROJECT_NAME}")
|
|
|
|
set(CMAKE_UNITY_BUILD true)
|
|
|
|
endif()
|
|
|
|
|
2015-07-29 07:19:43 -05:00
|
|
|
# Qt
|
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
# These headers need to go through Qt's MOC compiler
|
2018-11-27 01:40:24 -06:00
|
|
|
set( MOC_HEADER_FILES
|
2012-05-18 02:45:23 -05:00
|
|
|
cafViewer.h
|
|
|
|
)
|
|
|
|
|
2019-05-28 03:50:39 -05:00
|
|
|
if (CEE_USE_QT5)
|
|
|
|
find_package(Qt5 COMPONENTS REQUIRED Core Gui Widgets OpenGL)
|
|
|
|
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets Qt5::OpenGL)
|
|
|
|
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES} )
|
|
|
|
else()
|
|
|
|
find_package(Qt4 COMPONENTS QtCore QtGui QtMain QtOpenGl REQUIRED)
|
|
|
|
include(${QT_USE_FILE})
|
|
|
|
qt4_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES} )
|
|
|
|
endif(CEE_USE_QT5)
|
2012-05-18 02:45:23 -05:00
|
|
|
|
|
|
|
add_library( ${PROJECT_NAME}
|
|
|
|
cafCadNavigation.cpp
|
2013-08-30 08:35:28 -05:00
|
|
|
cafCadNavigation.h
|
2012-05-18 02:45:23 -05:00
|
|
|
cafCeetronNavigation.cpp
|
2013-08-30 08:35:28 -05:00
|
|
|
cafCeetronNavigation.h
|
2013-10-19 17:41:25 -05:00
|
|
|
cafCeetronPlusNavigation.cpp
|
|
|
|
cafCeetronPlusNavigation.h
|
2015-12-09 08:17:04 -06:00
|
|
|
cafTrackBallBasedNavigation.cpp
|
|
|
|
cafTrackBallBasedNavigation.h
|
2013-08-30 08:35:28 -05:00
|
|
|
cafNavigationPolicy.cpp
|
|
|
|
cafNavigationPolicy.h
|
2019-06-25 10:01:38 -05:00
|
|
|
cafPointOfInterestVisualizer.h
|
2012-05-18 02:45:23 -05:00
|
|
|
cafOpenGLWidget.cpp
|
2013-08-30 08:35:28 -05:00
|
|
|
cafOpenGLWidget.h
|
|
|
|
cafViewer.cpp
|
|
|
|
cafViewer.h
|
|
|
|
|
2018-11-27 01:40:24 -06:00
|
|
|
${MOC_SOURCE_FILES}
|
2012-05-18 02:45:23 -05:00
|
|
|
)
|
2018-02-27 10:20:46 -06:00
|
|
|
|
|
|
|
target_include_directories(${PROJECT_NAME}
|
|
|
|
PUBLIC
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries ( ${PROJECT_NAME}
|
|
|
|
LibCore
|
|
|
|
LibGeometry
|
|
|
|
LibViewing
|
|
|
|
LibRender
|
|
|
|
LibGuiQt
|
2018-02-27 13:00:56 -06:00
|
|
|
|
|
|
|
cafAnimControl
|
|
|
|
|
2018-02-27 10:20:46 -06:00
|
|
|
${QT_LIBRARIES}
|
|
|
|
)
|
|
|
|
|
2018-09-27 14:27:34 -05:00
|
|
|
if (MSVC)
|
|
|
|
set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/W4 /wd4100 /wd4127")
|
|
|
|
endif()
|
|
|
|
|
2018-02-27 10:20:46 -06:00
|
|
|
source_group("" FILES ${PROJECT_FILES})
|
2019-01-31 23:56:11 -06:00
|
|
|
|
2019-02-11 00:13:08 -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()
|