Skip to content
Permalink
Browse files
revert separation of modules gui/core, just a better code separation
  • Loading branch information
3nids committed May 19, 2021
1 parent 2e2e86e commit 18497e2a292253580f961fe9ccb66aef936d1990
@@ -1,6 +1,47 @@
set(AUTH_BASIC_SRCS
core/qgsauthbasicmethod.cpp
)

set(AUTH_BASIC_HDRS
core/qgsauthbasicmethod.h
)

set(AUTH_BASIC_UIS_H "")

if (WITH_GUI)
set(AUTH_BASIC_SRCS ${AUTH_BASIC_SRCS}
gui/qgsauthbasicmethodgui.cpp
gui/qgsauthbasicedit.cpp
)
set(AUTH_BASIC_HDRS ${AUTH_BASIC_HDRS}
gui/qgsauthbasicedit.h
)
set(AUTH_BASIC_UIS gui/qgsauthbasicedit.ui)
QT5_WRAP_UI(AUTH_BASIC_UIS_H ${AUTH_BASIC_UIS})
endif()

add_library(basicauthmethod MODULE ${AUTH_BASIC_SRCS} ${AUTH_BASIC_HDRS} ${AUTH_BASIC_UIS_H})

target_include_directories(basicauthmethod PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/core
)

# require c++17
target_compile_features(basicauthmethod PRIVATE cxx_std_17)

target_link_libraries(basicauthmethod qgis_core)

add_subdirectory(core)
if (WITH_GUI)
add_subdirectory(gui)
target_include_directories(basicauthmethod PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/gui
${CMAKE_CURRENT_BINARY_DIR}
)
target_link_libraries(basicauthmethod qgis_gui)
endif()

target_compile_definitions(basicauthmethod PRIVATE "-DQT_NO_FOREACH")

install(TARGETS basicauthmethod
RUNTIME DESTINATION ${QGIS_PLUGIN_DIR}
LIBRARY DESTINATION ${QGIS_PLUGIN_DIR}
)

This file was deleted.

This file was deleted.

@@ -16,29 +16,10 @@

#include "qgsauthbasicedit.h"

static const QString AUTH_METHOD_KEY = QStringLiteral( "Basic" );

/**
* Optional class factory to return a pointer to a newly created edit widget
*/
QGISEXTERN QgsAuthBasicEdit *editWidget( QWidget *parent )
{
return new QgsAuthBasicEdit( parent );
}

/**
* Required isAuthMethodGui function. Used to determine if this shared library
* is an authentication method plugin
*/
QGISEXTERN bool isAuthMethodGui()
{
return true;
}

/**
* Required key function (used to map the plugin to a data store type)
*/
QGISEXTERN QString authMethodKey()
{
return AUTH_METHOD_KEY;
}
@@ -1,6 +1,47 @@
set(AUTH_ESRITOKEN_SRCS
core/qgsauthesritokenmethod.cpp
)

set(AUTH_ESRITOKEN_HDRS
core/qgsauthesritokenmethod.h
)

set(AUTH_ESRITOKEN_UIS_H "")

if (WITH_GUI)
set(AUTH_ESRITOKEN_SRCS ${AUTH_ESRITOKEN_SRCS}
gui/qgsauthesritokenmethodgui.cpp
gui/qgsauthesritokenedit.cpp
)
set(AUTH_ESRITOKEN_HDRS ${AUTH_ESRITOKEN_HDRS}
gui/qgsauthesritokenedit.h
)
set(AUTH_ESRITOKEN_UIS gui/qgsauthesritokenedit.ui)
QT5_WRAP_UI(AUTH_ESRITOKEN_UIS_H ${AUTH_ESRITOKEN_UIS})
endif()

add_library(esritokenauthmethod MODULE ${AUTH_ESRITOKEN_SRCS} ${AUTH_ESRITOKEN_HDRS} ${AUTH_ESRITOKEN_UIS_H})

target_include_directories(esritokenauthmethod PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/core
)

# require c++17
target_compile_features(esritokenauthmethod PRIVATE cxx_std_17)

target_link_libraries(esritokenauthmethod qgis_core)

add_subdirectory(core)
if (WITH_GUI)
add_subdirectory(gui)
target_include_directories(esritokenauthmethod PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/gui
${CMAKE_CURRENT_BINARY_DIR}
)
target_link_libraries(esritokenauthmethod qgis_gui)
endif()

target_compile_definitions(esritokenauthmethod PRIVATE "-DQT_NO_FOREACH")

install(TARGETS esritokenauthmethod
RUNTIME DESTINATION ${QGIS_PLUGIN_DIR}
LIBRARY DESTINATION ${QGIS_PLUGIN_DIR}
)

This file was deleted.

This file was deleted.

@@ -16,8 +16,6 @@

#include "qgsauthesritokenedit.h"

static const QString AUTH_METHOD_KEY = QStringLiteral( "EsriToken" );


/**
* Optional class factory to return a pointer to a newly created edit widget
@@ -27,19 +25,3 @@ QGISEXTERN QgsAuthEsriTokenEdit *editWidget( QWidget *parent )
return new QgsAuthEsriTokenEdit( parent );
}

/**
* Required isAuthMethodGui function. Used to determine if this shared library
* is an authentication method plugin
*/
QGISEXTERN bool isAuthMethodGui()
{
return true;
}

/**
* Required key function (used to map the plugin to a data store type)
*/
QGISEXTERN QString authMethodKey()
{
return AUTH_METHOD_KEY;
}
@@ -1,6 +1,52 @@
set(AUTH_IDENTCERT_SRCS
core/qgsauthidentcertmethod.cpp
)

set(AUTH_IDENTCERT_HDRS
core/qgsauthidentcertmethod.h
)

set(AUTH_IDENTCERT_UIS_H "")

add_subdirectory(core)
if (WITH_GUI)
add_subdirectory(gui)
set(AUTH_IDENTCERT_SRCS ${AUTH_IDENTCERT_SRCS}
gui/qgsauthidentcertmethodgui.cpp
gui/qgsauthidentcertedit.cpp
)
set(AUTH_IDENTCERT_HDRS ${AUTH_IDENTCERT_HDRS}
gui/qgsauthidentcertedit.h
)
set(AUTH_IDENTCERT_UIS gui/qgsauthidentcertedit.ui)
QT5_WRAP_UI(AUTH_IDENTCERT_UIS_H ${AUTH_IDENTCERT_UIS})
endif()

add_library(identcertauthmethod MODULE ${AUTH_IDENTCERT_SRCS} ${AUTH_IDENTCERT_HDRS} ${AUTH_IDENTCERT_UIS_H})

target_include_directories(identcertauthmethod SYSTEM PUBLIC
${QCA_INCLUDE_DIR}
${QTKEYCHAIN_INCLUDE_DIR}
)

target_include_directories(identcertauthmethod PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/core
)

# require c++17
target_compile_features(identcertauthmethod PRIVATE cxx_std_17)

target_link_libraries(identcertauthmethod qgis_core)

if (WITH_GUI)
target_include_directories(identcertauthmethod PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/gui
${CMAKE_CURRENT_BINARY_DIR}
)
target_link_libraries(identcertauthmethod qgis_gui)
endif()

target_compile_definitions(identcertauthmethod PRIVATE "-DQT_NO_FOREACH")

install(TARGETS identcertauthmethod
RUNTIME DESTINATION ${QGIS_PLUGIN_DIR}
LIBRARY DESTINATION ${QGIS_PLUGIN_DIR}
)

This file was deleted.

0 comments on commit 18497e2

Please sign in to comment.