2018-02-27 17:20:46 +01:00
|
|
|
cmake_minimum_required (VERSION 2.8.12)
|
2015-07-29 14:19:43 +02:00
|
|
|
|
|
|
|
|
# Qt
|
2019-02-08 11:28:14 +01:00
|
|
|
if (CAF_USE_QT5)
|
|
|
|
|
find_package(Qt5 COMPONENTS Core Gui OpenGL Widgets REQUIRED)
|
2018-11-27 08:40:24 +01:00
|
|
|
else()
|
|
|
|
|
find_package(Qt4 COMPONENTS QtCore QtGui QtMain REQUIRED)
|
|
|
|
|
include(${QT_USE_FILE})
|
2019-02-08 11:28:14 +01:00
|
|
|
endif(CAF_USE_QT5)
|
2015-07-29 14:19:43 +02:00
|
|
|
|
|
|
|
|
project (cafCommand)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# These headers need to go through Qt's MOC compiler
|
2018-11-27 08:40:24 +01:00
|
|
|
set (MOC_HEADER_FILES
|
2015-07-29 14:19:43 +02:00
|
|
|
cafCmdFeature.h
|
|
|
|
|
cafCmdFeatureManager.h
|
|
|
|
|
)
|
|
|
|
|
|
2019-02-08 11:28:14 +01:00
|
|
|
if (CAF_USE_QT5)
|
2018-11-27 08:40:24 +01:00
|
|
|
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES} )
|
|
|
|
|
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets)
|
|
|
|
|
else()
|
|
|
|
|
qt4_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES} )
|
2019-02-08 11:28:14 +01:00
|
|
|
endif(CAF_USE_QT5)
|
2015-07-29 14:19:43 +02:00
|
|
|
|
|
|
|
|
set( PROJECT_FILES
|
|
|
|
|
|
|
|
|
|
cafCmdExecCommandManager.cpp
|
|
|
|
|
cafCmdExecCommandManager.h
|
|
|
|
|
cafCmdExecuteCommand.h
|
|
|
|
|
cafCmdUiCommandSystemImpl.h
|
|
|
|
|
cafCmdUiCommandSystemImpl.cpp
|
|
|
|
|
|
|
|
|
|
# Default features
|
|
|
|
|
defaultfeatures/cafCmdAddItemExec.cpp
|
|
|
|
|
defaultfeatures/cafCmdAddItemExec.h
|
|
|
|
|
defaultfeatures/cafCmdAddItemExecData.cpp
|
|
|
|
|
defaultfeatures/cafCmdAddItemExecData.h
|
|
|
|
|
defaultfeatures/cafCmdAddItemFeature.cpp
|
|
|
|
|
defaultfeatures/cafCmdAddItemFeature.h
|
|
|
|
|
defaultfeatures/cafCmdDeleteItemExec.cpp
|
|
|
|
|
defaultfeatures/cafCmdDeleteItemExec.h
|
|
|
|
|
defaultfeatures/cafCmdDeleteItemExecData.cpp
|
|
|
|
|
defaultfeatures/cafCmdDeleteItemExecData.h
|
|
|
|
|
defaultfeatures/cafCmdDeleteItemFeature.cpp
|
|
|
|
|
defaultfeatures/cafCmdDeleteItemFeature.h
|
|
|
|
|
|
|
|
|
|
cafCmdFieldChangeExec.cpp
|
|
|
|
|
cafCmdFieldChangeExec.h
|
|
|
|
|
|
|
|
|
|
cafCmdSelectionHelper.cpp
|
|
|
|
|
cafCmdSelectionHelper.h
|
|
|
|
|
cafCmdSelectionChangeExec.cpp
|
|
|
|
|
cafCmdSelectionChangeExec.h
|
|
|
|
|
|
|
|
|
|
cafCmdFeature.cpp
|
|
|
|
|
cafCmdFeature.h
|
|
|
|
|
cafCmdFeatureManager.cpp
|
|
|
|
|
cafCmdFeatureManager.h
|
2017-11-19 01:12:39 +01:00
|
|
|
cafCmdFeatureMenuBuilder.cpp
|
|
|
|
|
cafCmdFeatureMenuBuilder.h
|
2015-07-29 14:19:43 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
add_library( ${PROJECT_NAME}
|
|
|
|
|
${PROJECT_FILES}
|
2018-11-27 08:40:24 +01:00
|
|
|
${MOC_SOURCE_FILES}
|
2015-07-29 14:19:43 +02:00
|
|
|
)
|
|
|
|
|
|
2018-02-25 15:03:45 +01:00
|
|
|
target_include_directories(${PROJECT_NAME}
|
|
|
|
|
PUBLIC
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
target_link_libraries ( ${PROJECT_NAME}
|
|
|
|
|
cafProjectDataModel
|
2018-11-27 08:40:24 +01:00
|
|
|
${QT_LIBRARIES}
|
2018-02-25 15:03:45 +01:00
|
|
|
)
|
|
|
|
|
|
2018-09-27 21:27:34 +02:00
|
|
|
if (MSVC)
|
|
|
|
|
set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/W4 /wd4100 /wd4127")
|
|
|
|
|
endif()
|
|
|
|
|
|
2018-02-27 17:20:46 +01:00
|
|
|
source_group("" FILES ${PROJECT_FILES})
|
2019-02-01 06:56:11 +01:00
|
|
|
|
|
|
|
|
if (COMMAND ri_apply_cotire)
|
|
|
|
|
ri_apply_cotire()
|
|
|
|
|
endif()
|