ref #2 fix builds

This commit is contained in:
Andrei Yankovich 2021-04-16 16:36:24 +03:00
parent 4631d7834b
commit 867bf4547c
6 changed files with 2530 additions and 18 deletions

3
.gitmodules vendored
View File

@ -1,3 +1,6 @@
[submodule "ViewSolutions/CMake"]
path = ViewSolutions/CMake
url = https://github.com/QuasarApp/CMake.git
[submodule "CMake"]
path = CMake
url = https://github.com/QuasarApp/CMake.git

1
CMake Submodule

@ -0,0 +1 @@
Subproject commit 80494ec0d1da475ab3085cb80ac861804b11bec5

View File

@ -7,23 +7,44 @@
cmake_minimum_required(VERSION 3.5)
project(ViewSolutionsMain)
project(ViewSolutions LANGUAGES CXX)
if(TARGET ${PROJECT_NAME})
message("The ${PROJECT_NAME} arledy included in main Project")
return()
endif()
include(ViewSolutions/CMake/ccache.cmake)
add_subdirectory(ViewSolutions)
if ( NOT DEFINED VIEWSOLUTIONS_EXAMPLES )
set(VIEWSOLUTIONS_EXAMPLES ON)
if (DEFINED TARGET_PLATFORM_TOOLCHAIN)
if (${TARGET_PLATFORM_TOOLCHAIN} STREQUAL "wasm32")
set(VIEWSOLUTIONS_EXAMPLES OFF)
endif()
endif()
if (ANDROID)
set(VIEWSOLUTIONS_EXAMPLES OFF)
endif()
endif()
include(CMake/QuasarAppCITargets.cmake)
include(CMake/ccache.cmake)
include(CMake/QtUtils.cmake)
include(CMake/ProjectOut.cmake)
include(CMake/crossplatform/crossplatform.cmake)
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Quick QuickControls2 REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Quick QuickControls2 REQUIRED)
add_subdirectory(ViewSolutions)
if (VIEWSOLUTIONS_EXAMPLES )
message("DISABLE_EXAMPLES = ${DISABLE_EXAMPLES}")
add_subdirectory(Examples)
endif()
initAll()
addDoc(${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/doxygen.conf)

View File

@ -7,15 +7,6 @@
cmake_minimum_required(VERSION 3.5)
project(ViewSolutions LANGUAGES CXX)
if(TARGET ${PROJECT_NAME})
message("The ${PROJECT_NAME} arledy included in main Project")
return()
endif()
include(CMake/ProjectOut.cmake)
include(CMake/Version.cmake)
add_definitions(-DVIEW_SOLUTIONS_LIBRARY)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
@ -24,8 +15,6 @@ set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Quick QuickControls2 REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Quick QuickControls2 REQUIRED)
file(GLOB SOURCE_CPP
"src/*.cpp"
@ -34,11 +23,9 @@ file(GLOB SOURCE_CPP
)
add_library(${PROJECT_NAME} ${SOURCE_CPP})
target_link_libraries(${PROJECT_NAME} PUBLIC Qt::Core Qt::Quick Qt::QuickControls2)
target_link_libraries(${PROJECT_NAME} PUBLIC Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Quick Qt${QT_VERSION_MAJOR}::QuickControls2)
target_include_directories(${PROJECT_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/src")
target_compile_definitions(${PROJECT_NAME}
PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>)

2495
doxygen.conf Normal file

File diff suppressed because it is too large Load Diff

5
plug.pro Normal file
View File

@ -0,0 +1,5 @@
TEMPLATE = subdirs
QMAKE_EXTRA_TARGETS += \
test