Skip to content

Commit

Permalink
Remove cmake submodule
Browse files Browse the repository at this point in the history
IB-8354

Signed-off-by: Raul Metsma <raul@metsma.ee>
  • Loading branch information
metsma committed Jan 24, 2025
1 parent 4cd4e74 commit 3ddb372
Show file tree
Hide file tree
Showing 14 changed files with 104 additions and 52 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "cmake"]
path = cmake
url = ../cmake
[submodule "common"]
path = common
url = ../qt-common
47 changes: 29 additions & 18 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
cmake_minimum_required(VERSION 3.16)
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/cmake/modules/VersionInfo.cmake)
message(FATAL_ERROR "cmake submodule directory empty, did you 'git clone --recursive'?")
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/common/CMakeLists.txt)
message(FATAL_ERROR "common submodule directory empty, did you 'git clone --recursive'?")
endif()
project(qdigidoc4 VERSION 4.8.0)

set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)

include( GNUInstallDirs )
include( VersionInfo )

find_package(libdigidocpp 4.2.0 REQUIRED HINTS /Library)
message("-- Found libdigidocpp: ${libdigidocpp_DIR} (found version \"${libdigidocpp_VERSION}\")")
find_package( LDAP REQUIRED )
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} 5.12.0 REQUIRED COMPONENTS Core Widgets Network PrintSupport Svg LinguistTools)
find_package(FlatBuffers CONFIG REQUIRED NAMES FlatBuffers Flatbuffers)
find_package(ZLIB REQUIRED)
macro(SET_ENV NAME DEF)
if(DEFINED ENV{${NAME}})
set(${NAME} $ENV{${NAME}} ${ARGN})
else()
set(${NAME} ${DEF} ${ARGN})
endif()
endmacro()

set_env(BUILD_NUMBER 0)
set_env( TSL_URL "https://ec.europa.eu/tools/lotl/eu-lotl.xml" CACHE STRING "TSL trust list primary URL" )
set_env( TSL_INCLUDE "EE" CACHE STRING "TSL list include in binary" )
set_env(CDOC2_GET_URL "https://cdoc2-keyserver-get" CACHE STRING "CDoc 2.0 Key Server get URL")
set_env(CDOC2_POST_URL "https://cdoc2-keyserver-post" CACHE STRING "CDoc 2.0 Key Server post URL")
set_env(CDOC2_GET_URL "https://cdoc2.id.ee:8444" CACHE STRING "CDoc 2.0 Key Server get URL")
set_env(CDOC2_POST_URL "https://cdoc2.id.ee:8443" CACHE STRING "CDoc 2.0 Key Server post URL")
set_env( MOBILEID_URL "https://dd-mid.ria.ee/mid-api" CACHE STRING "URL for Mobile-ID" )
set_env( SMARTID_URL "https://dd-sid.ria.ee/v1" CACHE STRING "URL for Smart-ID" )
set(VERSION ${PROJECT_VERSION}.${BUILD_NUMBER})
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_C_VISIBILITY_PRESET hidden)
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
set(CMAKE_VISIBILITY_INLINES_HIDDEN YES)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED YES)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION YES)
Expand All @@ -41,6 +42,16 @@ set(CPACK_PACKAGING_INSTALL_PREFIX /usr)
set(CPACK_RPM_FILE_NAME RPM-DEFAULT)
set(CPACK_RPM_PACKAGE_RELEASE_DIST ON)
include(CPack)
include(GNUInstallDirs)

find_package(libdigidocpp 4.2.0 REQUIRED HINTS /Library)
message("-- Found libdigidocpp: ${libdigidocpp_DIR} (found version \"${libdigidocpp_VERSION}\")")
find_package( LDAP REQUIRED )
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} 5.12.0 REQUIRED COMPONENTS Core Widgets Network PrintSupport Svg LinguistTools)
find_package(FlatBuffers CONFIG REQUIRED NAMES FlatBuffers Flatbuffers)
find_package(ZLIB REQUIRED)

if(APPLE)
add_subdirectory(extensions/DigiDocQL)
elseif(WIN32)
Expand Down
6 changes: 6 additions & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
DigiDoc4 version [4.7.0](https://github.com/open-eid/DigiDoc4-Client/releases/tag/v4.7.0) release notes
--------------------------------------
- Code, Text and translation improvements and updates

[Full Changelog](https://github.com/open-eid/DigiDoc4-Client/compare/v4.6.0...v4.7.0)

DigiDoc4 version [4.6.0](https://github.com/open-eid/DigiDoc4-Client/releases/tag/v4.6.0) release notes
--------------------------------------
- Code, Text and translation improvements and updates
Expand Down
3 changes: 1 addition & 2 deletions client/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,7 @@ Application::Application( int &argc, char **argv )
, d(new Private)
{
setApplicationName(QStringLiteral("qdigidoc4"));
setApplicationVersion(QStringLiteral("%1.%2.%3.%4")
.arg( MAJOR_VER ).arg( MINOR_VER ).arg( RELEASE_VER ).arg( BUILD_VER ) );
setApplicationVersion(QStringLiteral(VERSION_STR));
setOrganizationDomain(QStringLiteral("ria.ee"));
setOrganizationName(QStringLiteral("RIA"));
setWindowIcon(QIcon(QStringLiteral(":/images/Icon.svg")));
Expand Down
6 changes: 6 additions & 0 deletions client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ set_target_properties(${PROJECT_NAME} PROPERTIES
AUTORCC ON
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/mac/Info.plist.cmake
MACOSX_BUNDLE_BUNDLE_NAME ${PROJECT_NAME}
MACOSX_BUNDLE_COPYRIGHT "(C) 2010-2025 Estonian Information System Authority"
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION}
MACOSX_BUNDLE_BUNDLE_VERSION ${BUILD_NUMBER}
MACOSX_BUNDLE_ICON_FILE Icon.icns
MACOSX_BUNDLE_GUI_IDENTIFIER "ee.ria.${PROJECT_NAME}"
)
target_compile_definitions(${PROJECT_NAME} PRIVATE
Expand All @@ -127,6 +131,8 @@ target_compile_definitions(${PROJECT_NAME} PRIVATE
MOBILEID_URL="${MOBILEID_URL}"
SMARTID_URL="${SMARTID_URL}"
BUILD_DATE="${BUILD_DATE}"
VERSION=${PROJECT_VERSION_MAJOR},${PROJECT_VERSION_MINOR},${PROJECT_VERSION_PATCH},${BUILD_NUMBER}
VERSION_STR="${VERSION}"
)

foreach(SCHEMA ${SCHEMAS})
Expand Down
14 changes: 14 additions & 0 deletions client/ee.ria.qdigidoc4.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,20 @@
<binary>qdigidoc4</binary>
</provides>
<releases>
<release version="4.7.0" date="2025-01-02">
<description>
<ul>
<li>Code, Text and translation improvements and updates</li>
</ul>
</description>
</release>
<release version="4.6.0" date="2024-10-08">
<description>
<ul>
<li>Code, Text and translation improvements and updates</li>
</ul>
</description>
</release>
<release version="4.5.0" date="2024-04-16">
<description>
<ul>
Expand Down
3 changes: 1 addition & 2 deletions client/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ int main( int argc, char *argv[] )
{
QCoreApplication qtApp( argc, argv );
qtApp.setApplicationName(QStringLiteral("qdigidoc4"));
qtApp.setApplicationVersion(QStringLiteral("%1.%2.%3.%4")
.arg(MAJOR_VER).arg(MINOR_VER).arg(RELEASE_VER).arg(BUILD_VER));
qtApp.setApplicationVersion(QStringLiteral(VERSION_STR));
qtApp.setOrganizationDomain(QStringLiteral("ria.ee"));
qtApp.setOrganizationName(QStringLiteral("RIA"));

Expand Down
19 changes: 8 additions & 11 deletions client/qdigidoc4.rc
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
#include <winver.h>

#define VER_STR_HELPER(x) #x
#define VER_STR(x) VER_STR_HELPER(x)

VS_VERSION_INFO VERSIONINFO
FILEVERSION MAJOR_VER,MINOR_VER,RELEASE_VER,BUILD_VER
PRODUCTVERSION MAJOR_VER,MINOR_VER,RELEASE_VER,BUILD_VER
FILEVERSION VERSION
PRODUCTVERSION VERSION
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
Expand All @@ -22,23 +19,23 @@ BEGIN
BEGIN
VALUE "CompanyName", "RIA"
VALUE "FileDescription", "DigiDoc4"
VALUE "FileVersion", VER_STR(MAJOR_VER.MINOR_VER.RELEASE_VER.BUILD_VER)
VALUE "FileVersion", VERSION_STR
VALUE "InternalName", "qdigidoc4"
VALUE "LegalCopyright", "Copyright (C) 2017-2024 Estonian Information System Authority"
VALUE "LegalCopyright", "Copyright (C) 2017-2025 Estonian Information System Authority"
VALUE "OriginalFilename", "qdigidoc4.exe"
VALUE "ProductName", "DigiDoc4"
VALUE "ProductVersion", VER_STR(MAJOR_VER.MINOR_VER.RELEASE_VER.BUILD_VER)
VALUE "ProductVersion", VERSION_STR
END
BLOCK "042504B0"
BEGIN
VALUE "CompanyName", "RIA"
VALUE "FileDescription", "DigiDoc4"
VALUE "FileVersion", VER_STR(MAJOR_VER.MINOR_VER.RELEASE_VER.BUILD_VER)
VALUE "FileVersion", VERSION_STR
VALUE "InternalName", "qdigidoc4"
VALUE "LegalCopyright", "Copyright (C) 2017-2024 Riigi Infosüsteemi Amet"
VALUE "LegalCopyright", "Copyright (C) 2017-2025 Riigi Infosüsteemi Amet"
VALUE "OriginalFilename", "qdigidoc4.exe"
VALUE "ProductName", "DigiDoc4"
VALUE "ProductVersion", VER_STR(MAJOR_VER.MINOR_VER.RELEASE_VER.BUILD_VER)
VALUE "ProductVersion", VERSION_STR
END
END
BLOCK "VarFileInfo"
Expand Down
1 change: 0 additions & 1 deletion cmake
Submodule cmake deleted from 043e0e
24 changes: 24 additions & 0 deletions cmake/modules/FindLDAP.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# - Try to find the LDAP client libraries
# Once done this will define
#
# LDAP_FOUND - system has libldap
# LDAP_INCLUDE_DIR - the ldap include directory
# LDAP_LIBRARIES - libldap + liblber library

set(CMAKE_FIND_FRAMEWORK LAST)
find_path(LDAP_INCLUDE_DIR ldap.h Winldap.h)
find_library(LDAP_LIBRARY NAMES ldap Wldap32)
find_library(LBER_LIBRARY NAMES lber)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LDAP DEFAULT_MSG LDAP_LIBRARY)

if(LDAP_FOUND)
if(LBER_LIBRARY)
set(LDAP_LIBRARIES ${LDAP_LIBRARY} ${LBER_LIBRARY})
else()
set(LDAP_LIBRARIES ${LDAP_LIBRARY})
endif()
endif()

mark_as_advanced(LDAP_INCLUDE_DIR LDAP_LIBRARY LBER_LIBRARY)
2 changes: 1 addition & 1 deletion debian/copyright
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Upstream-Contact: info@ria.ee
Source: https://github.com/open-eid/DigiDoc4-Client

Files: *
Copyright: 2017-2024 Estonian Information System's Authority
Copyright: 2017-2025 Estonian Information System's Authority
License: LGPL-2.1
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
Expand Down
2 changes: 1 addition & 1 deletion extensions/DigiDocQL/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<key>CFPlugInUnloadFunction</key>
<string></string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2012-2024 Estonian Information System's Authority. All rights reserved.</string>
<string>Copyright © 2012-2025 Estonian Information System's Authority. All rights reserved.</string>
<key>QLNeedsToBeRunInMainThread</key>
<false/>
<key>QLPreviewHeight</key>
Expand Down
15 changes: 9 additions & 6 deletions extensions/windows/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
cmake_minimum_required(VERSION 3.16)
project(EsteidShellExtension VERSION 3.13.9)

set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)

include(VersionInfo)

if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(PLATFORM "x64")
else()
Expand All @@ -17,13 +13,20 @@ add_library(${PROJECT_NAME} SHARED
EsteidShlExt.cpp
EsteidShellExtension.rc
)
target_compile_definitions(${PROJECT_NAME}
_UNICODE
UNICODE
_WINDLL
WIN32_LEAN_AND_MEAN
VERSION=${PROJECT_VERSION_MAJOR},${PROJECT_VERSION_MINOR},${PROJECT_VERSION_PATCH},${BUILD_NUMBER}
VERSION_STR="${VERSION}"
)
set_target_properties(${PROJECT_NAME} PROPERTIES
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>"
COMPILE_DEFINITIONS "_UNICODE;UNICODE;_WINDLL;WIN32_LEAN_AND_MEAN"
INTERPROCEDURAL_OPTIMIZATION YES
COMPILE_OPTIONS "/guard:cf"
LINK_OPTIONS "/guard:cf"
LINK_LIBRARIES "uxtheme.lib"
LINK_LIBRARIES uxtheme.lib
SKIP_AUTOMOC ON
)

Expand Down
11 changes: 4 additions & 7 deletions extensions/windows/EsteidShellExtension.rc
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,9 @@ END
// Version
//

#define VER_STR_HELPER(x) #x
#define VER_STR(x) VER_STR_HELPER(x)

VS_VERSION_INFO VERSIONINFO
FILEVERSION MAJOR_VER,MINOR_VER,RELEASE_VER,BUILD_VER
PRODUCTVERSION MAJOR_VER,MINOR_VER,RELEASE_VER,BUILD_VER
FILEVERSION VERSION
PRODUCTVERSION VERSION
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -76,12 +73,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "RIA"
VALUE "FileDescription", "Estonian ID Card Software explorer integration"
VALUE "FileVersion", VER_STR(MAJOR_VER.MINOR_VER.RELEASE_VER.BUILD_VER)
VALUE "FileVersion", VERSION_STR
VALUE "InternalName", "EsteidShellExtension.dll"
VALUE "LegalCopyright", "(c) RIA. All rights reserved."
VALUE "OriginalFilename", "EsteidShellExtension.dll"
VALUE "ProductName", "Estonian ID Card Software"
VALUE "ProductVersion", VER_STR(MAJOR_VER.MINOR_VER.RELEASE_VER.BUILD_VER)
VALUE "ProductVersion", VERSION_STR
END
END
BLOCK "VarFileInfo"
Expand Down

0 comments on commit 3ddb372

Please sign in to comment.