mirror of
https://github.com/QuasarApp/Qt-Secret.git
synced 2025-04-28 16:44:32 +00:00
ref #82 fix builds
This commit is contained in:
parent
f3348d2b49
commit
19894f1994
@ -12,20 +12,47 @@ if(TARGET ${PROJECT_NAME})
|
||||
return()
|
||||
endif()
|
||||
|
||||
include(src/mini-gmp/CMake/ccache.cmake)
|
||||
include(src/mini-gmp/CMake/QuasarAppCITargets.cmake)
|
||||
initAll()
|
||||
include(src/mini-gmp/CMake/QuasarApp.cmake)
|
||||
include(src/mini-gmp/CMake/Version.cmake)
|
||||
|
||||
if (NOT DEFINED QTSECRET_TESTS)
|
||||
set(QTSECRET_TESTS ON)
|
||||
set(QTSECRET_GUI ON)
|
||||
|
||||
if (DEFINED TARGET_PLATFORM_TOOLCHAIN)
|
||||
if (${TARGET_PLATFORM_TOOLCHAIN} STREQUAL "wasm32")
|
||||
set(QTSECRET_TESTS OFF)
|
||||
set(QTSECRET_GUI OFF)
|
||||
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (ANDROID)
|
||||
set(QTSECRET_TESTS OFF)
|
||||
set(QTSECRET_GUI OFF)
|
||||
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Add sub directories
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(tests)
|
||||
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
|
||||
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core REQUIRED)
|
||||
|
||||
IF(NOT DEFINED WITHOUT_GUI)
|
||||
# Add sub directories
|
||||
add_subdirectory(src/mini-gmp)
|
||||
add_subdirectory(src)
|
||||
if (QTSECRET_TESTS)
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
|
||||
IF(DEFINED QTSECRET_GUI)
|
||||
message("The GUI Example is enabled")
|
||||
add_subdirectory(Qt-Secret-GUI)
|
||||
else()
|
||||
message("The GUI Example is disabled")
|
||||
endif()
|
||||
|
||||
initAll()
|
||||
|
||||
addDoc("Qt-Secret" ${CMAKE_CURRENT_SOURCE_DIR}/doxygen.conf)
|
||||
|
||||
|
@ -9,9 +9,6 @@ cmake_minimum_required(VERSION 3.10)
|
||||
set(CURRENT_PROJECT "${PROJECT_NAME}-GUI")
|
||||
|
||||
|
||||
include(../src/mini-gmp/CMake/ProjectOut.cmake)
|
||||
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
@ -27,5 +24,5 @@ file(GLOB SOURCE_CPP
|
||||
)
|
||||
|
||||
add_executable(${CURRENT_PROJECT} ${SOURCE_CPP})
|
||||
target_link_libraries(${CURRENT_PROJECT} PRIVATE Qt::Quick Qt-Secret)
|
||||
target_link_libraries(${CURRENT_PROJECT} PRIVATE Qt${QT_VERSION_MAJOR}::Quick Qt-Secret)
|
||||
target_include_directories(${CURRENT_PROJECT} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
@ -11,7 +11,6 @@ CONFIG += ordered
|
||||
SUBDIRS += \
|
||||
minigmp \
|
||||
src \
|
||||
qaesencryption \
|
||||
Qt-Secret-GUI
|
||||
|
||||
contains(DEFINES, WITHOUT_GUI): {
|
||||
@ -31,6 +30,5 @@ lessThan (QT_MINOR_VERSION, 12) {
|
||||
minigmp.file = src/mini-gmp/GMP.pro
|
||||
src.file = src/Qt-Secret.pro
|
||||
tests.file = tests/Qt-SecretTest.pro
|
||||
qaesencryption.file = src/Qt-AES/qaesencryption.pro
|
||||
|
||||
|
||||
|
@ -8,12 +8,6 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
set(CURRENT_PROJECT ${PROJECT_NAME})
|
||||
|
||||
add_subdirectory(mini-gmp)
|
||||
|
||||
include(mini-gmp/CMake/ProjectOut.cmake)
|
||||
include(mini-gmp/CMake/Version.cmake)
|
||||
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
@ -23,9 +17,6 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
add_definitions(-DQt_SECRET_LIBRARY)
|
||||
|
||||
|
||||
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
|
||||
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core REQUIRED)
|
||||
|
||||
file(GLOB SOURCE_CPP
|
||||
"Qt-AES/qaesencryption.cpp"
|
||||
"Qt-RSA/*.cpp"
|
||||
@ -33,12 +24,10 @@ file(GLOB SOURCE_CPP
|
||||
)
|
||||
|
||||
add_library(${CURRENT_PROJECT} ${SOURCE_CPP})
|
||||
target_link_libraries(${CURRENT_PROJECT} PUBLIC Qt::Core QtBigint)
|
||||
target_link_libraries(${CURRENT_PROJECT} PUBLIC Qt${QT_VERSION_MAJOR}::Core QtBigint)
|
||||
target_include_directories(${CURRENT_PROJECT} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/Qt-AES")
|
||||
target_include_directories(${CURRENT_PROJECT} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/Qt-AES/aesni")
|
||||
|
||||
target_include_directories(${CURRENT_PROJECT} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/Qt-RSA")
|
||||
|
||||
include(mini-gmp/CMake/QuasarAppCITargets.cmake)
|
||||
|
||||
setVersion(1 3 1)
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 2d9c9e94f4434867a6a37ea6026af43e0ab79d0d
|
||||
Subproject commit 7281435f64aeba21395d852c935a5c0cf58a564a
|
@ -9,7 +9,6 @@ cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
set(CURRENT_PROJECT ${PROJECT_NAME}Test)
|
||||
|
||||
include(../src/mini-gmp/CMake/ProjectOut.cmake)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
@ -38,11 +37,9 @@ file(GLOB SOURCE_CPP_AES
|
||||
)
|
||||
|
||||
add_executable("${CURRENT_PROJECT}_AES" ${SOURCE_CPP_AES})
|
||||
target_link_libraries("${CURRENT_PROJECT}_AES" PUBLIC Qt::Core Qt::Test Qt-Secret)
|
||||
target_link_libraries("${CURRENT_PROJECT}_AES" PUBLIC Qt${QT_VERSION_MAJOR}::Test Qt-Secret)
|
||||
target_include_directories("${CURRENT_PROJECT}_AES" PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../src/Qt-AES/unit_test")
|
||||
|
||||
|
||||
include(../src/mini-gmp/CMake/QuasarAppCITargets.cmake)
|
||||
initTests()
|
||||
addTests("Qt-SecretRSA" "${CURRENT_PROJECT}_RSA")
|
||||
addTests("Qt-SecretAES" "${CURRENT_PROJECT}_AES")
|
||||
|
Loading…
x
Reference in New Issue
Block a user