ResInsight/Fwk/AppFwk/cafUserInterface/CMakeLists.txt

180 lines
4.6 KiB
CMake
Raw Normal View History

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
2012-06-26 09:10:41 -05:00
cafPdmUiCheckBoxEditor.h
cafPdmUiCheckBoxTristateEditor.h
cafPdmUiColorEditor.h
2012-06-26 09:10:41 -05:00
cafPdmUiComboBoxEditor.h
2017-06-16 06:34:19 -05:00
cafPdmUiDateEditor.h
cafPdmUiDefaultObjectEditor.h
cafPdmUiDoubleSliderEditor.h
2012-06-26 09:10:41 -05:00
cafPdmUiFilePathEditor.h
cafPdmUiLineEditor.h
2012-06-26 09:10:41 -05:00
cafPdmUiListEditor.h
cafPdmUiListView.h
cafPdmUiListViewEditor.h
cafPdmUiPropertyView.h
cafPdmUiPushButtonEditor.h
2012-06-26 09:10:41 -05:00
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
2017-06-16 06:34:19 -05:00
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
2015-08-20 02:57:38 -05:00
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
2015-08-20 02:57:38 -05:00
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}
2012-06-26 09:10:41 -05:00
${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}
)
2017-03-29 01:13:45 -05:00
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})