Skip to content

Commit 9e85e3b

Browse files
Excluded opensslPlugin from the windows build
formatted code
1 parent 07242ae commit 9e85e3b

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

app/CMakeLists.txt

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,10 @@ set(MM_HDRS
184184
mmstyle.h
185185
)
186186

187+
if (NOT WIN32)
188+
set(MM_SRCS ${MM_SRCS} static_plugins.cpp)
189+
endif ()
190+
187191
if (HAVE_BLUETOOTH)
188192
set(MM_SRCS ${MM_SRCS} position/providers/bluetoothpositionprovider.cpp)
189193

@@ -524,20 +528,15 @@ endif ()
524528
target_link_libraries(
525529
MerginMaps
526530
PUBLIC Qt6Keychain::Qt6Keychain
527-
qca
528-
GDAL::GDAL
529-
PostgreSQL::PostgreSQL
530-
Spatialite::Spatialite
531-
)
532-
533-
if(NOT WIN32)
534-
target_link_libraries(
535-
MerginMaps
536-
PUBLIC ${QCA_OSSL_PLUGIN_LIB}
531+
qca
532+
GDAL::GDAL
533+
PostgreSQL::PostgreSQL
534+
Spatialite::Spatialite
537535
)
538-
endif()
539-
540536

537+
if (NOT WIN32)
538+
target_link_libraries(MerginMaps PUBLIC ${QCA_OSSL_PLUGIN_LIB})
539+
endif ()
541540

542541
target_link_libraries(
543542
MerginMaps

app/main.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,6 @@
156156
#include "qgsapplication.h"
157157
#include "activeproject.h"
158158
#include "appsettings.h"
159-
// required for QGIS authentication manager API
160-
#include <QtPlugin>
161-
Q_IMPORT_PLUGIN( opensslPlugin )
162159

163160
static QString getDataDir()
164161
{
@@ -402,6 +399,8 @@ void addQmlImportPath( QQmlEngine &engine )
402399

403400
int main( int argc, char *argv[] )
404401
{
402+
// for windows qca dll
403+
QCoreApplication::addLibraryPath( QCoreApplication::applicationDirPath() );
405404
QgsApplication app( argc, argv, true );
406405

407406
const QString version = CoreUtils::appVersion();

app/static_plugins.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#include <QtPlugin>
2+
// Required for QGIS authentication manager API on static builds (Linux/macOS/iOS)
3+
Q_IMPORT_PLUGIN( opensslPlugin )

0 commit comments

Comments
 (0)