ResInsight/Fwk/AppFwk/cafUserInterface/CMakeLists.txt
2018-09-13 08:54:40 +02:00

180 lines
4.6 KiB
CMake

cmake_minimum_required (VERSION 2.8.12)
if (MSVC)
# Define this one to tell windows.h to not define min() and max() as macros
add_definitions(-DNOMINMAX)
endif (MSVC)
# Qt
find_package ( Qt4 COMPONENTS QtCore QtGui QtMain )
include (${QT_USE_FILE})
project (cafUserInterface)
# These headers need to go through Qt's MOC compiler
set( QOBJECT_HEADERS
cafPdmUiCheckBoxDelegate.h
cafPdmUiCheckBoxEditor.h
cafPdmUiCheckBoxTristateEditor.h
cafPdmUiColorEditor.h
cafPdmUiComboBoxEditor.h
cafPdmUiDateEditor.h
cafPdmUiDefaultObjectEditor.h
cafPdmUiDoubleSliderEditor.h
cafPdmUiFilePathEditor.h
cafPdmUiLineEditor.h
cafPdmUiListEditor.h
cafPdmUiListView.h
cafPdmUiListViewEditor.h
cafPdmUiPropertyView.h
cafPdmUiPushButtonEditor.h
cafPdmUiSliderEditor.h
cafPdmUiTableView.h
cafPdmUiTableViewDelegate.h
cafPdmUiTableViewEditor.h
cafPdmUiTableViewQModel.h
cafPdmUiTextEditor.h
cafPdmUiToolButtonEditor.h
cafPdmUiTreeView.h
cafPdmUiTreeViewQModel.h
cafPdmUiTreeViewEditor.h
cafUiProcess.h
QMinimizePanel.h
cafPdmUiTreeSelectionEditor.h
cafPdmUiTreeSelectionQModel.h
cafPdmUiFormLayoutObjectEditor.h
cafPdmUiDoubleValueEditor.h
)
if ( NOT CMAKE_AUTOMOC )
qt4_wrap_cpp( MOC_FILES_CPP ${QOBJECT_HEADERS} )
endif()
set( PROJECT_FILES
# field editors
cafPdmUiCheckBoxDelegate.cpp
cafPdmUiCheckBoxDelegate.h
cafPdmUiCheckBoxEditor.cpp
cafPdmUiCheckBoxEditor.h
cafPdmUiCheckBoxTristateEditor.cpp
cafPdmUiCheckBoxTristateEditor.h
cafPdmUiColorEditor.cpp
cafPdmUiColorEditor.h
cafPdmUiComboBoxEditor.cpp
cafPdmUiComboBoxEditor.h
cafPdmUiDateEditor.cpp
cafPdmUiDateEditor.h
cafPdmUiDoubleSliderEditor.cpp
cafPdmUiDoubleSliderEditor.h
cafPdmUiDragDropInterface.h
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
cafPdmUiTreeSelectionEditor.h
cafPdmUiTreeSelectionEditor.cpp
cafPdmUiTreeSelectionQModel.h
cafPdmUiTreeSelectionQModel.cpp
cafPdmUiFieldEditorHelper.h
cafPdmUiFieldEditorHelper.cpp
# object editors
cafPdmUiDefaultObjectEditor.cpp
cafPdmUiDefaultObjectEditor.h
cafPdmUiListView.cpp
cafPdmUiListView.h
cafPdmUiListViewEditor.cpp
cafPdmUiListViewEditor.h
cafPdmUiTableRowEditor.cpp
cafPdmUiTableRowEditor.h
cafPdmUiTableView.cpp
cafPdmUiTableView.h
cafPdmUiTableViewDelegate.cpp
cafPdmUiTableViewDelegate.h
cafPdmUiTableViewEditor.cpp
cafPdmUiTableViewEditor.h
cafPdmUiTableViewQModel.cpp
cafPdmUiTableViewQModel.h
cafPdmUiTreeEditorHandle.cpp
cafPdmUiTreeEditorHandle.h
cafPdmUiTreeItemEditor.cpp
cafPdmUiTreeItemEditor.h
cafPdmUiTreeView.cpp
cafPdmUiTreeView.h
cafPdmUiTreeViewEditor.cpp
cafPdmUiTreeViewEditor.h
cafPdmUiTreeViewQModel.cpp
cafPdmUiTreeViewQModel.h
cafPdmUiPropertyView.cpp
cafPdmUiPropertyView.h
cafPdmUiPropertyViewDialog.cpp
cafPdmUiPropertyViewDialog.h
cafPdmUiFormLayoutObjectEditor.cpp
cafPdmUiFormLayoutObjectEditor.h
cafPdmUiDoubleValueEditor.cpp
cafPdmUiDoubleValueEditor.h
# div
cafAboutDialog.cpp
cafAboutDialog.h
cafProgressInfo.cpp
cafProgressInfo.h
cafUiProcess.cpp
cafUiProcess.h
QMinimizePanel.cpp
QMinimizePanel.h
cafQTreeViewStateSerializer.h
cafQTreeViewStateSerializer.cpp
cafMemoryInspector.h
cafMemoryInspector.cpp
)
add_library( ${PROJECT_NAME}
${PROJECT_FILES}
${MOC_FILES_CPP}
)
if (MSVC)
set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/W4 /wd4100 /wd4127")
endif()
target_include_directories(${PROJECT_NAME}
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)
target_link_libraries ( ${PROJECT_NAME}
cafProjectDataModel
${QT_LIBRARIES}
)
if (COMMAND cotire)
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()
source_group("" FILES ${PROJECT_FILES})