2018-02-27 10:20:46 -06:00
|
|
|
cmake_minimum_required (VERSION 2.8.12)
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2018-06-20 02:56:46 -05:00
|
|
|
if (MSVC)
|
|
|
|
# Define this one to tell windows.h to not define min() and max() as macros
|
|
|
|
add_definitions(-DNOMINMAX)
|
|
|
|
endif (MSVC)
|
|
|
|
|
2015-07-29 07:19:43 -05:00
|
|
|
# Qt
|
|
|
|
find_package ( Qt4 COMPONENTS QtCore QtGui QtMain )
|
|
|
|
include (${QT_USE_FILE})
|
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
project (cafUserInterface)
|
|
|
|
|
2015-07-29 07:19:43 -05:00
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
# These headers need to go through Qt's MOC compiler
|
|
|
|
set( QOBJECT_HEADERS
|
2015-07-29 07:19:43 -05:00
|
|
|
cafPdmUiCheckBoxDelegate.h
|
2012-06-26 09:10:41 -05:00
|
|
|
cafPdmUiCheckBoxEditor.h
|
2017-01-31 09:08:04 -06:00
|
|
|
cafPdmUiCheckBoxTristateEditor.h
|
2015-07-29 07:19:43 -05:00
|
|
|
cafPdmUiColorEditor.h
|
2012-06-26 09:10:41 -05:00
|
|
|
cafPdmUiComboBoxEditor.h
|
2017-06-16 06:34:19 -05:00
|
|
|
cafPdmUiDateEditor.h
|
2017-03-20 16:12:07 -05:00
|
|
|
cafPdmUiDefaultObjectEditor.h
|
2015-07-29 07:19:43 -05:00
|
|
|
cafPdmUiDoubleSliderEditor.h
|
2012-06-26 09:10:41 -05:00
|
|
|
cafPdmUiFilePathEditor.h
|
2015-07-29 07:19:43 -05:00
|
|
|
cafPdmUiLineEditor.h
|
2012-06-26 09:10:41 -05:00
|
|
|
cafPdmUiListEditor.h
|
2015-07-29 07:19:43 -05:00
|
|
|
cafPdmUiListView.h
|
|
|
|
cafPdmUiListViewEditor.h
|
|
|
|
cafPdmUiPropertyView.h
|
|
|
|
cafPdmUiPushButtonEditor.h
|
2012-06-26 09:10:41 -05:00
|
|
|
cafPdmUiSliderEditor.h
|
2015-07-29 07:19:43 -05:00
|
|
|
cafPdmUiTableView.h
|
|
|
|
cafPdmUiTableViewDelegate.h
|
|
|
|
cafPdmUiTableViewEditor.h
|
2018-06-11 04:16:35 -05:00
|
|
|
cafPdmUiTableViewQModel.h
|
2013-04-03 09:06:00 -05:00
|
|
|
cafPdmUiTextEditor.h
|
2015-08-13 08:23:33 -05:00
|
|
|
cafPdmUiToolButtonEditor.h
|
2013-09-02 01:14:29 -05:00
|
|
|
cafPdmUiTreeView.h
|
2018-06-11 04:16:35 -05:00
|
|
|
cafPdmUiTreeViewQModel.h
|
2015-07-29 07:19:43 -05:00
|
|
|
cafPdmUiTreeViewEditor.h
|
|
|
|
cafUiProcess.h
|
2017-03-20 08:54:21 -05:00
|
|
|
QMinimizePanel.h
|
2017-09-05 06:29:38 -05:00
|
|
|
cafPdmUiTreeSelectionEditor.h
|
|
|
|
cafPdmUiTreeSelectionQModel.h
|
2018-08-27 09:11:39 -05:00
|
|
|
cafPdmUiFormLayoutObjectEditor.h
|
2018-01-02 02:27:37 -06:00
|
|
|
cafPdmUiDoubleValueEditor.h
|
2012-05-18 02:45:23 -05:00
|
|
|
)
|
|
|
|
|
2018-02-27 10:20:46 -06:00
|
|
|
if ( NOT CMAKE_AUTOMOC )
|
2012-09-18 08:21:04 -05:00
|
|
|
qt4_wrap_cpp( MOC_FILES_CPP ${QOBJECT_HEADERS} )
|
|
|
|
endif()
|
2012-05-18 02:45:23 -05:00
|
|
|
|
|
|
|
|
2015-07-29 07:19:43 -05:00
|
|
|
set( PROJECT_FILES
|
|
|
|
|
|
|
|
# field editors
|
|
|
|
cafPdmUiCheckBoxDelegate.cpp
|
|
|
|
cafPdmUiCheckBoxDelegate.h
|
|
|
|
cafPdmUiCheckBoxEditor.cpp
|
|
|
|
cafPdmUiCheckBoxEditor.h
|
2017-01-31 09:08:04 -06:00
|
|
|
cafPdmUiCheckBoxTristateEditor.cpp
|
|
|
|
cafPdmUiCheckBoxTristateEditor.h
|
2015-07-29 07:19:43 -05:00
|
|
|
cafPdmUiColorEditor.cpp
|
|
|
|
cafPdmUiColorEditor.h
|
|
|
|
cafPdmUiComboBoxEditor.cpp
|
|
|
|
cafPdmUiComboBoxEditor.h
|
2017-06-16 06:34:19 -05:00
|
|
|
cafPdmUiDateEditor.cpp
|
|
|
|
cafPdmUiDateEditor.h
|
2015-07-29 07:19:43 -05:00
|
|
|
cafPdmUiDoubleSliderEditor.cpp
|
|
|
|
cafPdmUiDoubleSliderEditor.h
|
2015-10-23 04:03:23 -05:00
|
|
|
cafPdmUiDragDropInterface.h
|
2015-07-29 07:19:43 -05:00
|
|
|
cafPdmUiFilePathEditor.cpp
|
|
|
|
cafPdmUiFilePathEditor.h
|
|
|
|
cafPdmUiLineEditor.cpp
|
|
|
|
cafPdmUiLineEditor.h
|
|
|
|
cafPdmUiListEditor.cpp
|
|
|
|
cafPdmUiListEditor.h
|
|
|
|
cafPdmUiPushButtonEditor.cpp
|
|
|
|
cafPdmUiPushButtonEditor.h
|
|
|
|
cafPdmUiSliderEditor.cpp
|
|
|
|
cafPdmUiSliderEditor.h
|
|
|
|
cafPdmUiTextEditor.cpp
|
|
|
|
cafPdmUiTextEditor.h
|
|
|
|
cafPdmUiToolBarEditor.cpp
|
|
|
|
cafPdmUiToolBarEditor.h
|
|
|
|
cafPdmUiToolButtonEditor.cpp
|
|
|
|
cafPdmUiToolButtonEditor.h
|
2017-09-05 06:29:38 -05:00
|
|
|
cafPdmUiTreeSelectionEditor.h
|
|
|
|
cafPdmUiTreeSelectionEditor.cpp
|
|
|
|
cafPdmUiTreeSelectionQModel.h
|
|
|
|
cafPdmUiTreeSelectionQModel.cpp
|
2017-09-12 00:09:16 -05:00
|
|
|
cafPdmUiFieldEditorHelper.h
|
|
|
|
cafPdmUiFieldEditorHelper.cpp
|
2017-09-06 07:45:36 -05:00
|
|
|
|
2015-07-29 07:19:43 -05:00
|
|
|
# object editors
|
|
|
|
cafPdmUiDefaultObjectEditor.cpp
|
|
|
|
cafPdmUiDefaultObjectEditor.h
|
|
|
|
cafPdmUiListView.cpp
|
2015-08-20 02:57:38 -05:00
|
|
|
cafPdmUiListView.h
|
2013-09-04 05:08:39 -05:00
|
|
|
cafPdmUiListViewEditor.cpp
|
|
|
|
cafPdmUiListViewEditor.h
|
2018-08-16 06:52:36 -05:00
|
|
|
cafPdmUiTableRowEditor.cpp
|
|
|
|
cafPdmUiTableRowEditor.h
|
2015-07-29 07:19:43 -05:00
|
|
|
cafPdmUiTableView.cpp
|
|
|
|
cafPdmUiTableView.h
|
|
|
|
cafPdmUiTableViewDelegate.cpp
|
|
|
|
cafPdmUiTableViewDelegate.h
|
|
|
|
cafPdmUiTableViewEditor.cpp
|
|
|
|
cafPdmUiTableViewEditor.h
|
2018-06-11 04:16:35 -05:00
|
|
|
cafPdmUiTableViewQModel.cpp
|
|
|
|
cafPdmUiTableViewQModel.h
|
2015-07-29 07:19:43 -05:00
|
|
|
cafPdmUiTreeEditorHandle.cpp
|
|
|
|
cafPdmUiTreeEditorHandle.h
|
|
|
|
cafPdmUiTreeItemEditor.cpp
|
|
|
|
cafPdmUiTreeItemEditor.h
|
|
|
|
cafPdmUiTreeView.cpp
|
2015-08-20 02:57:38 -05:00
|
|
|
cafPdmUiTreeView.h
|
2013-09-02 01:14:29 -05:00
|
|
|
cafPdmUiTreeViewEditor.cpp
|
|
|
|
cafPdmUiTreeViewEditor.h
|
2018-06-11 04:16:35 -05:00
|
|
|
cafPdmUiTreeViewQModel.cpp
|
|
|
|
cafPdmUiTreeViewQModel.h
|
2015-07-29 07:19:43 -05:00
|
|
|
cafPdmUiPropertyView.cpp
|
|
|
|
cafPdmUiPropertyView.h
|
|
|
|
cafPdmUiPropertyViewDialog.cpp
|
|
|
|
cafPdmUiPropertyViewDialog.h
|
2018-08-27 09:11:39 -05:00
|
|
|
cafPdmUiFormLayoutObjectEditor.cpp
|
|
|
|
cafPdmUiFormLayoutObjectEditor.h
|
2018-01-02 02:27:37 -06:00
|
|
|
cafPdmUiDoubleValueEditor.cpp
|
|
|
|
cafPdmUiDoubleValueEditor.h
|
2017-09-11 08:26:22 -05:00
|
|
|
|
2015-07-29 07:19:43 -05:00
|
|
|
|
|
|
|
# div
|
|
|
|
cafAboutDialog.cpp
|
|
|
|
cafAboutDialog.h
|
|
|
|
cafProgressInfo.cpp
|
|
|
|
cafProgressInfo.h
|
|
|
|
cafUiProcess.cpp
|
|
|
|
cafUiProcess.h
|
2017-03-20 08:54:21 -05:00
|
|
|
QMinimizePanel.cpp
|
|
|
|
QMinimizePanel.h
|
2017-09-06 07:45:36 -05:00
|
|
|
cafQTreeViewStateSerializer.h
|
|
|
|
cafQTreeViewStateSerializer.cpp
|
2018-06-15 06:28:43 -05:00
|
|
|
cafMemoryInspector.h
|
|
|
|
cafMemoryInspector.cpp
|
2015-07-29 07:19:43 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
add_library( ${PROJECT_NAME}
|
|
|
|
|
|
|
|
${PROJECT_FILES}
|
2012-06-26 09:10:41 -05:00
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
${MOC_FILES_CPP}
|
|
|
|
)
|
2015-07-29 07:19:43 -05:00
|
|
|
|
2018-09-13 01:54:40 -05:00
|
|
|
if (MSVC)
|
|
|
|
set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/W4 /wd4100 /wd4127")
|
|
|
|
endif()
|
|
|
|
|
2018-02-25 08:03:45 -06:00
|
|
|
target_include_directories(${PROJECT_NAME}
|
|
|
|
PUBLIC
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
)
|
|
|
|
|
2015-07-29 07:19:43 -05:00
|
|
|
target_link_libraries ( ${PROJECT_NAME}
|
|
|
|
cafProjectDataModel
|
|
|
|
${QT_LIBRARIES}
|
|
|
|
)
|
|
|
|
|
2017-03-29 01:13:45 -05:00
|
|
|
if (COMMAND cotire)
|
2016-06-10 07:03:22 -05:00
|
|
|
cotire(${PROJECT_NAME})
|
|
|
|
|
|
|
|
# make sure the unity target is included in the active builds to trigger rebuild before debug
|
|
|
|
get_target_property(_unityTargetName ${PROJECT_NAME} COTIRE_UNITY_TARGET_NAME)
|
|
|
|
set_target_properties(${_unityTargetName} PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD FALSE)
|
|
|
|
set_target_properties(${PROJECT_NAME} PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD TRUE)
|
|
|
|
|
|
|
|
endif()
|
|
|
|
|
2015-07-29 07:19:43 -05:00
|
|
|
source_group("" FILES ${PROJECT_FILES})
|