2020-10-30 06:31:16 -05:00
|
|
|
project(cafAnimControl)
|
2018-12-10 07:49:38 -06:00
|
|
|
|
2020-01-23 06:37:29 -06:00
|
|
|
# Unity Build
|
2020-10-30 06:31:16 -05:00
|
|
|
if(CAF_ENABLE_UNITY_BUILD)
|
2020-01-23 06:37:29 -06:00
|
|
|
message("Cmake Unity build is enabled on : ${PROJECT_NAME}")
|
|
|
|
set(CMAKE_UNITY_BUILD true)
|
|
|
|
endif()
|
|
|
|
|
2019-02-08 04:28:14 -06:00
|
|
|
# Qt
|
2020-10-30 06:31:16 -05:00
|
|
|
set(MOC_HEADER_FILES cafFrameAnimationControl.h cafAnimationToolBar.h
|
2021-09-01 01:13:16 -05:00
|
|
|
cafPopupMenuButton.h
|
|
|
|
)
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2020-10-30 06:31:16 -05:00
|
|
|
find_package(
|
|
|
|
Qt5
|
|
|
|
COMPONENTS
|
2021-09-01 01:13:16 -05:00
|
|
|
REQUIRED Core Gui Widgets
|
|
|
|
)
|
2020-04-23 15:59:37 -05:00
|
|
|
set(QT_LIBRARIES Qt5::Core Qt5::Gui Qt5::Widgets)
|
2020-10-30 06:31:16 -05:00
|
|
|
qt5_wrap_cpp(MOC_SOURCE_FILES ${MOC_HEADER_FILES})
|
|
|
|
|
|
|
|
# NOTE! Resources in this subfolder appends to the variable QRC_FILES in parent
|
|
|
|
# scope CMakeList.txt in the application folder (parent scope) must use the
|
|
|
|
# following syntax to make sure the QRC_FILES variable contains appended files
|
|
|
|
# in subfolders
|
|
|
|
|
|
|
|
# set( QRC_FILES ${QRC_FILES} Resources/MyaApplication.qrc )
|
|
|
|
|
|
|
|
set(QRC_FILES
|
|
|
|
${QRC_FILES} ${CMAKE_CURRENT_SOURCE_DIR}/Resources/cafAnimControl.qrc
|
2021-09-01 01:13:16 -05:00
|
|
|
PARENT_SCOPE
|
|
|
|
)
|
2020-10-30 06:31:16 -05:00
|
|
|
|
|
|
|
set(PROJECT_FILES
|
|
|
|
cafFrameAnimationControl.h cafFrameAnimationControl.cpp
|
|
|
|
cafAnimationToolBar.h cafAnimationToolBar.cpp cafPopupMenuButton.h
|
2021-09-01 01:13:16 -05:00
|
|
|
cafPopupMenuButton.cpp
|
|
|
|
)
|
2020-10-30 06:31:16 -05:00
|
|
|
|
|
|
|
add_library(${PROJECT_NAME} ${PROJECT_FILES} ${MOC_SOURCE_FILES})
|
|
|
|
|
|
|
|
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
2018-02-27 10:20:46 -06:00
|
|
|
|
2018-11-27 01:40:24 -06:00
|
|
|
target_link_libraries(${PROJECT_NAME} ${QT_LIBRARIES})
|
|
|
|
|
2020-10-30 06:31:16 -05:00
|
|
|
if(MSVC)
|
|
|
|
set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/W4 /wd4127")
|
2018-09-27 14:27:34 -05:00
|
|
|
endif()
|
|
|
|
|
2018-02-27 10:20:46 -06:00
|
|
|
source_group("" FILES ${PROJECT_FILES})
|