diff options
author | Saturneric <[email protected]> | 2021-06-20 08:21:38 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2021-06-20 08:21:38 +0000 |
commit | 14b0079998df2564d1c6562393b6d97382dbad5b (patch) | |
tree | 0f15f4d5072931a6941194f35ac88678ba3c929f | |
parent | Update cmake.yml (diff) | |
download | GpgFrontend-14b0079998df2564d1c6562393b6d97382dbad5b.tar.gz GpgFrontend-14b0079998df2564d1c6562393b6d97382dbad5b.zip |
Update cmake.yml
Update CMakeLists.txt
Diffstat (limited to '')
-rw-r--r-- | .github/workflows/cmake.yml | 24 | ||||
-rw-r--r-- | include/GpgFrontend.h | 6 | ||||
-rw-r--r-- | src/CMakeLists.txt | 30 |
3 files changed, 31 insertions, 29 deletions
diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 742cd594..d81361f9 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -25,9 +25,12 @@ jobs: - name: Install Dependence run: | sudo apt-get update - sudo apt-get -y install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib p7zip p7zip-full msmtp libssl-dev texinfo libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint + sudo apt-get -y install build-essential binutils git autoconf automake sudo apt-get -y install gcc g++ - sudo apt-get -y install libgpgme-dev gpg qt5-default qttools5-dev-tools qttools5-dev + sudo apt-get -y install libgpgme-dev gpg + + - name: Install Qt + uses: jurplel/install-qt-action@v2 - name: Build GpgME run: | @@ -38,21 +41,18 @@ jobs: sudo make install cd .. - - name: Re-Install Qt - uses: jurplel/install-qt-action@v2 - - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DEXECUTABLE_OUTPUT_PATH=${{env.EXECUTABLE_OUTPUT_PATH}} - - name: Build + - name: Build GpgFrontend # Build your program with the given configuration - run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -- -j 2 - - name: Test - working-directory: ${{github.workspace}}/build - # Execute tests defined by the CMake configuration. - # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail - run: ctest -C ${{env.BUILD_TYPE}} + - name: Upload Artifact + uses: actions/upload-artifact@master + with: + name: gpgfrontend-linux + path: ${{github.workspace}}/build/release/* diff --git a/include/GpgFrontend.h b/include/GpgFrontend.h index c85e8f3a..1b5056ee 100644 --- a/include/GpgFrontend.h +++ b/include/GpgFrontend.h @@ -18,15 +18,15 @@ #define PROJECT_NAME "GpgFrontend" #define BUILD_VERSION "1.0.0_Windows-10.0.19042_AMD64_Release" -#define GIT_VERSION "main_898aca1f8f5511d15d5df1b923e2764f84f6482c" +#define GIT_VERSION "main_ecd0e478c9a84d1d750a827bf80e3ca2ec97adc9" #define VERSION_MAJOR 1 #define VERSION_MINOR 0 #define VERSION_PATCH 0 -#define BUILD_TIMESTAMP "2021-06-20 15:40:33" +#define BUILD_TIMESTAMP "2021-06-20 16:06:56" #define GIT_BRANCH_NAME "main" -#define GIT_COMMIT_HASH "898aca1f8f5511d15d5df1b923e2764f84f6482c" +#define GIT_COMMIT_HASH "ecd0e478c9a84d1d750a827bf80e3ca2ec97adc9" #endif //GPGFRONTEND_H_IN diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index cab0e30b..179af5c1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -10,32 +10,34 @@ set_property(SOURCE gpgfrontend.rc APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_SOURCE file(GLOB_RECURSE GPGFRONTEND_HEADER_FILES RELACTIVE ${CMAKE_SOURCE_DIR}/include/*.h) qt5_wrap_cpp(QT5_MOCS ${GPGFRONTEND_HEADER_FILES} TARGET gpgfrontend) +# Set Binary Output Path +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/release) +message(STATUS "CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}") + # Set Translation Files file(GLOB_RECURSE QT_TS_FILES RELACTIVE ${CMAKE_SOURCE_DIR}/resource/ts/*.ts) -set(QT_QM_FILES_OUTPUT_DIR ${CMAKE_BINARY_DIR}/src/ts) +set(QT_QM_FILES_OUTPUT_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ts) set_source_files_properties(${QT_TS_FILES} PROPERTIES OUTPUT_LOCATION ${QT_QM_FILES_OUTPUT_DIR}) QT5_create_translation(QON_QM_FILES ${BASE_SOURCE} ${QT_TS_FILES}) -message(STATUS ${QON_QM_FILES}) add_custom_target(translations DEPENDS ${QON_QM_FILES}) - # Set Build Information configure_file(${CMAKE_SOURCE_DIR}/include/GpgFrontend.h.in ${CMAKE_SOURCE_DIR}/include/GpgFrontend.h @ONLY) # Copy Resource Files -file(COPY ${CMAKE_SOURCE_DIR}/resource/css DESTINATION ${EXECUTABLE_OUTPUT_PATH}/ FOLLOW_SYMLINK_CHAIN) -file(COPY ${CMAKE_SOURCE_DIR}/resource/icons DESTINATION ${EXECUTABLE_OUTPUT_PATH}/ FOLLOW_SYMLINK_CHAIN) -file(COPY ${CMAKE_SOURCE_DIR}/resource/help DESTINATION ${EXECUTABLE_OUTPUT_PATH}/ FOLLOW_SYMLINK_CHAIN) -file(COPY ${CMAKE_SOURCE_DIR}/resource/conf DESTINATION ${EXECUTABLE_OUTPUT_PATH}/ FOLLOW_SYMLINK_CHAIN) +file(COPY ${CMAKE_SOURCE_DIR}/resource/css DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ FOLLOW_SYMLINK_CHAIN) +file(COPY ${CMAKE_SOURCE_DIR}/resource/icons DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ FOLLOW_SYMLINK_CHAIN) +file(COPY ${CMAKE_SOURCE_DIR}/resource/help DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ FOLLOW_SYMLINK_CHAIN) +file(COPY ${CMAKE_SOURCE_DIR}/resource/conf DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ FOLLOW_SYMLINK_CHAIN) if(MINGW) message(STATUS "Copying Dependent DLL For Windows Runtime Env") - file(COPY ${CMAKE_SOURCE_DIR}/resource/utils/lib/ DESTINATION ${EXECUTABLE_OUTPUT_PATH}/ FOLLOW_SYMLINK_CHAIN) - file(COPY ${CMAKE_SOURCE_DIR}/resource/utils/gpgme/ DESTINATION ${EXECUTABLE_OUTPUT_PATH}/ FOLLOW_SYMLINK_CHAIN) - file(COPY ${CMAKE_SOURCE_DIR}/resource/utils/bearer DESTINATION ${EXECUTABLE_OUTPUT_PATH}/ FOLLOW_SYMLINK_CHAIN) - file(COPY ${CMAKE_SOURCE_DIR}/resource/utils/iconengines DESTINATION ${EXECUTABLE_OUTPUT_PATH}/ FOLLOW_SYMLINK_CHAIN) - file(COPY ${CMAKE_SOURCE_DIR}/resource/utils/imageformats DESTINATION ${EXECUTABLE_OUTPUT_PATH}/ FOLLOW_SYMLINK_CHAIN) - file(COPY ${CMAKE_SOURCE_DIR}/resource/utils/printsupport DESTINATION ${EXECUTABLE_OUTPUT_PATH}/ FOLLOW_SYMLINK_CHAIN) - file(COPY ${CMAKE_SOURCE_DIR}/resource/utils/platforms DESTINATION ${EXECUTABLE_OUTPUT_PATH}/ FOLLOW_SYMLINK_CHAIN) + file(COPY ${CMAKE_SOURCE_DIR}/resource/utils/lib/ DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ FOLLOW_SYMLINK_CHAIN) + file(COPY ${CMAKE_SOURCE_DIR}/resource/utils/gpgme/ DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ FOLLOW_SYMLINK_CHAIN) + file(COPY ${CMAKE_SOURCE_DIR}/resource/utils/bearer DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ FOLLOW_SYMLINK_CHAIN) + file(COPY ${CMAKE_SOURCE_DIR}/resource/utils/iconengines DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ FOLLOW_SYMLINK_CHAIN) + file(COPY ${CMAKE_SOURCE_DIR}/resource/utils/imageformats DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ FOLLOW_SYMLINK_CHAIN) + file(COPY ${CMAKE_SOURCE_DIR}/resource/utils/printsupport DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ FOLLOW_SYMLINK_CHAIN) + file(COPY ${CMAKE_SOURCE_DIR}/resource/utils/platforms DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ FOLLOW_SYMLINK_CHAIN) endif() set(RESOURCE_FILES ${CMAKE_SOURCE_DIR}/gpgfrontend.qrc ${APP_ICON_RESOURCE_WINDOWS} ${QON_QM_FILES}) |