Merge pull request #14 from QuasarApp/task_6

Added submodule QuasarAppLib
This commit is contained in:
Andrei Yankovich 2021-04-12 23:41:23 +03:00 committed by GitHub
commit cfc403bae7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 25 additions and 15 deletions

6
.gitmodules vendored
View File

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

1
CMake

@ -1 +0,0 @@
Subproject commit c59a0c81555a281273b38095613472abc0fe73b7

View File

@ -17,8 +17,8 @@ set (QT_VERSION_MAJOR OFF)
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Test QUIET)
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Test QUIET)
include(CMake/ccache.cmake)
include(CMake/QuasarAppCITargets.cmake)
include(./src/QuasarAppLib/CMake/ccache.cmake)
include(./src/QuasarAppLib/CMake/QuasarAppCITargets.cmake)
# Add sub directories
add_subdirectory(src)

View File

@ -5,6 +5,15 @@
//# of this license document, but changing it is not allowed.
//#
#include <quasarapp.h>
int main(int argc, char *argv[]) {
if (!QuasarAppUtils::Params::parseParams(argc, argv)) {
QuasarAppUtils::Params::log("wrong parametrs", QuasarAppUtils::Warning);
exit(0);
}
return 0;
}

View File

@ -17,10 +17,12 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
include(../CMake/ProjectOut.cmake)
include(../CMake/Version.cmake)
include(../CMake/QtUtils.cmake)
include(../CMake/crossplatform/crossplatform.cmake)
include(./QuasarAppLib/CMake/ProjectOut.cmake)
include(./QuasarAppLib/CMake/Version.cmake)
include(./QuasarAppLib/CMake/QtUtils.cmake)
include(./QuasarAppLib/CMake/crossplatform/crossplatform.cmake)
add_subdirectory(QuasarAppLib)
add_subdirectory(CFixer)
add_subdirectory(CopyrighFixer)

View File

@ -25,9 +25,8 @@ set(PRIVATE_INCUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Private")
add_library(${PROJECT_NAME} ${SOURCE_CPP})
if (${QT_VERSION_MAJOR})
target_link_libraries(${PROJECT_NAME} PUBLIC Qt${QT_VERSION_MAJOR}::Core)
endif()
target_link_libraries(${PROJECT_NAME} PUBLIC Qt${QT_VERSION_MAJOR}::Core QuasarApp)
target_include_directories(${PROJECT_NAME} PUBLIC ${PUBLIC_INCUDE_DIR})
target_include_directories(${PROJECT_NAME} PRIVATE ${PRIVATE_INCUDE_DIR})

1
src/QuasarAppLib Submodule

@ -0,0 +1 @@
Subproject commit a7f5756f524159279461e664ebaaf8c4c0db4c28

View File

@ -9,7 +9,7 @@ cmake_minimum_required(VERSION 3.14)
set(CURRENT_PROJECT ${PROJECT_NAME}Test)
include(../CMake/ProjectOut.cmake)
include(../src/QuasarAppLib/CMake/ProjectOut.cmake)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
@ -34,6 +34,6 @@ target_link_libraries(${CURRENT_PROJECT} PRIVATE Qt::Test CopyrighFixer)
target_include_directories(${CURRENT_PROJECT} PUBLIC ${PUBLIC_INCUDE_DIR})
include(../CMake/QuasarAppCITargets.cmake)
include(../src/QuasarAppLib/CMake/QuasarAppCITargets.cmake)
initTests()
addTests(${PROJECT_NAME} ${CURRENT_PROJECT})