chore(@desktop/general): CMake include files optimization

This commit is contained in:
Sale Djenic 2021-08-23 09:27:57 +02:00 committed by Michał
parent c38a360e74
commit 8599442510
1 changed files with 6 additions and 37 deletions

View File

@ -6,46 +6,15 @@ include(GNUInstallDirs)
macro(add_target name type)
find_package(Qt5 COMPONENTS Core Qml Gui Quick QuickControls2 Widgets Network REQUIRED)
add_library(${name} ${type}
include/DOtherSide/DOtherSideTypes.h
include/DOtherSide/DOtherSideTypesCpp.h
include/DOtherSide/DOtherSide.h
include/DOtherSide/DosQDeclarative.h
include/DOtherSide/DosQObjectWrapper.h
include/DOtherSide/DosQAbstractItemModelWrapper.h
include/DOtherSide/DosQObject.h
include/DOtherSide/DosQObjectImpl.h
include/DOtherSide/DosIQObjectImpl.h
include/DOtherSide/DosQMetaObject.h
include/DOtherSide/DosIQAbstractItemModelImpl.h
include/DOtherSide/DosQAbstractItemModel.h
include/DOtherSide/Utils.h
include/DOtherSide/StatusEvents/StatusDockShowAppEvent.h
include/DOtherSide/StatusEvents/StatusOSThemeEvent.h
include/DOtherSide/DOtherSideStatusWindow.h
include/DOtherSide/DOtherSideSingleInstance.h
include/DOtherSide/DOtherSideStatusSyntaxHighlighter.h
src/DOtherSide.cpp
src/DosQMetaObject.cpp
src/DosQDeclarative.cpp
src/DosQObject.cpp
src/DOtherSideTypesCpp.cpp
src/DosQObjectImpl.cpp
src/DosQAbstractItemModel.cpp
src/DosQQuickImageProvider.cpp
src/StatusEvents/StatusDockShowAppEvent.cpp
src/StatusEvents/StatusOSThemeEvent.cpp
src/DOtherSideStatusWindow.cpp
src/DOtherSideSingleInstance.cpp
src/DOtherSideStatusSyntaxHighlighter.cpp
)
if (APPLE)
target_sources(${name} PUBLIC src/DOtherSideStatusWindow_osx.mm)
file(GLOB_RECURSE HEADERS include/DOtherSide/*.h)
if(APPLE)
file(GLOB_RECURSE SOURCES src/*.cpp src/*.mm)
else()
target_sources(${name} PUBLIC ${CMAKE_SOURCE_DIR}/lib/src/DOtherSideStatusWindow_other.cpp)
file(GLOB_RECURSE SOURCES src/*.cpp)
endif()
add_library(${name} ${type} ${SOURCES} ${HEADERS})
if (WIN32)
target_compile_definitions(${name} PRIVATE -DWIN32)
endif()