From 06815bb722deff96cf072dab9c33a72efb806714 Mon Sep 17 00:00:00 2001 From: "U. Bruhin" Date: Sun, 17 Mar 2024 01:47:19 +0100 Subject: [PATCH] WIP --- .github/workflows/main.yml | 28 ++++++++++++++------------- server/libFunq/CMakeLists.txt | 19 ++++++++++++------ server/tests/libFunq/CMakeLists.txt | 2 +- server/tests/protocole/CMakeLists.txt | 2 +- 4 files changed, 30 insertions(+), 21 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 81892ba..ad75dcb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -146,12 +146,12 @@ jobs: tools: "tools_mingw,qt.tools.win32_mingw810" compiler_path: "D:/a/funq/Qt/Tools/mingw810_32/bin" nosetests: 0 # Nosetest not working anymore - - qt: 6 - qt_full: "6.7.0" - arch: "win64_mingw" - tools: "tools_mingw1310" - compiler_path: "D:/a/funq/Qt/Tools/mingw1310_64/bin" - nosetests: 0 # Nosetest not working anymore + #- qt: 6 + # qt_full: "6.7.0" + # arch: "win64_mingw" + # tools: "tools_mingw1310" + # compiler_path: "D:/a/funq/Qt/Tools/mingw1310_64/bin" + # nosetests: 0 # Nosetest not working anymore env: CMAKE_GENERATOR: "MinGW Makefiles" CC: "${{ matrix.compiler_path }}/gcc.exe" @@ -176,12 +176,10 @@ jobs: cd build cmake ../server -DBUILD_TESTS=1 -DBUILD_DISALLOW_WARNINGS=1 make - - # Note: The executables don't run yet, don't know why :-/ - # - name: Run libFunq tests - # run: build/tests/libFunq/testLibFunq.exe - # - name: Run protocole tests - # run: build/tests/protocole/testProtocole.exe + - name: Run libFunq tests + run: build\tests\libFunq\testLibFunq.exe + - name: Run protocole tests + run: build\tests\protocole\testProtocole.exe # Server - name: Install server @@ -196,7 +194,11 @@ jobs: # Functional tests - name: Build test app - run: cd tests-functionnal/funq-test-app && cmake . && make + run: | + cp build\libFunq.dll tests-functionnal\ + cd tests-functionnal/funq-test-app + cmake . + make - name: Test functional run: cd tests-functionnal && nosetests if: ${{ matrix.nosetests != 0}} diff --git a/server/libFunq/CMakeLists.txt b/server/libFunq/CMakeLists.txt index 848fdeb..f578646 100644 --- a/server/libFunq/CMakeLists.txt +++ b/server/libFunq/CMakeLists.txt @@ -2,8 +2,8 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC OFF) set(CMAKE_AUTORCC OFF) -add_library( - Funq SHARED +set( + FUNQ_SOURCES delayedresponse.cpp delayedresponse.h dragndropresponse.cpp @@ -25,12 +25,13 @@ add_library( shortcutresponse.h ) if(WIN32) - target_sources(Funq PRIVATE WindowsInjector.cpp WindowsInjector.h) + list(APPEND FUNQ_SOURCES WindowsInjector.cpp WindowsInjector.h) else() - target_sources(Funq PRIVATE ldPreloadInjector.cpp) + list(APPEND FUNQ_SOURCES ldPreloadInjector.cpp) endif() -target_link_libraries( - Funq PUBLIC + +set( + FUNQ_DEPENDENCIES ${QT}::Core ${QT}::Gui ${QT}::Network @@ -38,3 +39,9 @@ target_link_libraries( ${QT}::Test $<$:${QT}::Quick> ) + +add_library(FunqStatic STATIC ${FUNQ_SOURCES}) +target_link_libraries(FunqStatic PUBLIC ${FUNQ_DEPENDENCIES}) + +add_library(Funq SHARED ${FUNQ_SOURCES}) +target_link_libraries(Funq PUBLIC ${FUNQ_DEPENDENCIES}) diff --git a/server/tests/libFunq/CMakeLists.txt b/server/tests/libFunq/CMakeLists.txt index 1cf6423..75d3603 100644 --- a/server/tests/libFunq/CMakeLists.txt +++ b/server/tests/libFunq/CMakeLists.txt @@ -16,7 +16,7 @@ target_compile_options( ) target_link_libraries( testLibFunq PUBLIC - Funq + FunqStatic ${QT}::Core ${QT}::Gui ${QT}::Widgets diff --git a/server/tests/protocole/CMakeLists.txt b/server/tests/protocole/CMakeLists.txt index e1aff6b..1631a4c 100644 --- a/server/tests/protocole/CMakeLists.txt +++ b/server/tests/protocole/CMakeLists.txt @@ -12,6 +12,6 @@ target_include_directories( ) target_link_libraries( testProtocole PUBLIC - Funq + FunqStatic ${QT}::Core )