Skip to content
Permalink
Browse files
[cmake] rename plugin targets to plugin_* (#45975)
* [cmake] rename plugin targets to plugin_*

this is the same semantic than for auth methods and providers

* revert nsis changes

* also rename grass plugin target
  • Loading branch information
3nids committed Nov 11, 2021
1 parent 1e8f64d commit 725dcb377cde0e16c1cee1ec7702dbb341de18a0
@@ -36,7 +36,7 @@ IF(WIN32)
#MESSAGE("Searching for QGIS in $ENV{PROGRAMFILES}/QGIS")
IF (MINGW)
FIND_PATH(QGIS_PLUGIN_DIR
NAMES libofflineeditingplugin.dll
NAMES libplugin_offlineediting.dll
PATHS
"$ENV{PROGRAMFILES}/QGIS/plugins"
)
@@ -59,7 +59,7 @@ IF(WIN32)

IF (MSVC)
FIND_PATH(QGIS_PLUGIN_DIR
NAMES offlineeditingplugin.dll
NAMES plugin_offlineediting.dll
PATHS
"$ENV{OSGEO4W_ROOT}/apps/${OSGEO4W_QGIS_SUBDIR}/plugins"
"$ENV{PROGRAMFILES}/QGIS/plugins"
@@ -105,7 +105,7 @@ ELSE(WIN32)
IF(UNIX)
#MESSAGE("Searching for QGIS in /usr/bin; /usr/local/bin")
FIND_PATH(QGIS_PLUGIN_DIR
NAMES libofflineeditingplugin.so
NAMES libplugin_offlineediting.so
PATHS
${QGIS_BUILD_PATH}/PlugIns/qgis
${QGIS_MAC_PATH}/PlugIns/qgis
@@ -1,7 +1,7 @@
usr/lib/qgis/plugins/libgeometrycheckerplugin.so
usr/lib/qgis/plugins/libplugin_geometrychecker.so
usr/lib/qgis/plugins/libauthmethod_oauth2.so
usr/lib/qgis/plugins/libofflineeditingplugin.so
usr/lib/qgis/plugins/libtopolplugin.so
usr/lib/qgis/plugins/libplugin_offlineediting.so
usr/lib/qgis/plugins/libplugin_topology.so
usr/share/applications/
usr/share/metainfo/
usr/share/mime/packages/
@@ -382,9 +382,9 @@ if not exist %ARCH%\release\qgis\%PACKAGENAME% mkdir %ARCH%\release\qgis\%PACKAG
"apps/%PACKAGENAME%/i18n/" ^
"apps/%PACKAGENAME%/icons/" ^
"apps/%PACKAGENAME%/images/" ^
"apps/%PACKAGENAME%/plugins/offlineeditingplugin.dll" ^
"apps/%PACKAGENAME%/plugins/topolplugin.dll" ^
"apps/%PACKAGENAME%/plugins/geometrycheckerplugin.dll" ^
"apps/%PACKAGENAME%/plugins/plugin_offlineediting.dll" ^
"apps/%PACKAGENAME%/plugins/plugin_topology.dll" ^
"apps/%PACKAGENAME%/plugins/plugin_geometrychecker.dll" ^
"apps/%PACKAGENAME%/qtplugins/sqldrivers/qsqlspatialite.dll" ^
"apps/%PACKAGENAME%/qtplugins/designer/" ^
"apps/%PACKAGENAME%/python/" ^
@@ -441,7 +441,7 @@ for %%g IN (%GRASS_VERSIONS%) do (
"apps/%PACKAGENAME%/grass/modules/qgis.g.info!v!.exe" ^
"apps/%PACKAGENAME%/grass/modules/qgis.r.in!v!.exe" ^
"apps/%PACKAGENAME%/grass/modules/qgis.v.in!v!.exe" ^
"apps/%PACKAGENAME%/plugins/grassplugin!v!.dll" ^
"apps/%PACKAGENAME%/plugins/plugin_grass!v!.dll" ^
"apps/%PACKAGENAME%/plugins/provider_grass!v!.dll" ^
"apps/%PACKAGENAME%/plugins/provider_grassraster!v!.dll" ^
"bin/%PACKAGENAME%-grass!v!.bat.tmpl" ^
@@ -36,10 +36,10 @@ else()
QT5_WRAP_UI (geometrychecker_UIS_H ${geometrychecker_UIS})
endif()

add_library (geometrycheckerplugin MODULE ${geometrychecker_SRCS} ${geometrychecker_RCCS} ${geometrychecker_UIS_H})
add_library (plugin_geometrychecker MODULE ${geometrychecker_SRCS} ${geometrychecker_RCCS} ${geometrychecker_UIS_H})

# require c++17
target_compile_features(geometrycheckerplugin PRIVATE cxx_std_17)
target_compile_features(plugin_geometrychecker PRIVATE cxx_std_17)

include_directories(
${CMAKE_SOURCE_DIR}/src/plugins
@@ -53,7 +53,7 @@ include_directories(SYSTEM
${GDAL_INCLUDE_DIR}
)

target_link_libraries(geometrycheckerplugin
target_link_libraries(plugin_geometrychecker
qgis_core
qgis_gui
qgis_analysis
@@ -62,7 +62,7 @@ target_link_libraries(geometrycheckerplugin
########################################################
# Install

install(TARGETS geometrycheckerplugin
install(TARGETS plugin_geometrychecker
RUNTIME DESTINATION ${QGIS_PLUGIN_DIR}
LIBRARY DESTINATION ${QGIS_PLUGIN_DIR})

@@ -182,30 +182,30 @@ macro(ADD_GRASSPLUGIN GRASS_BUILD_VERSION)
${CMAKE_BINARY_DIR}/src/providers/grass/${GRASS_BUILD_VERSION}
)

add_library (grassplugin${GRASS_BUILD_VERSION} MODULE
add_library (plugin_grass${GRASS_BUILD_VERSION} MODULE
${GRASS_PLUGIN_SRCS}
${GRASS_PLUGIN_MOC_SRCS}
${GRASS_PLUGIN_UIS_H}
${GRASS_PLUGIN_RCCS}
)

set_target_properties(grassplugin${GRASS_BUILD_VERSION} PROPERTIES
set_target_properties(plugin_grass${GRASS_BUILD_VERSION} PROPERTIES
COMPILE_FLAGS "-DGRASS_BASE=\\\"${GRASS_PREFIX}\\\" ${GRASS_EXTRA_INCLUDE_DIRS${GRASS_BUILD_VERSION}}"
)

if(MSVC)
set_source_files_properties(${GRASS_PLUGIN_SRCS} PROPERTIES COMPILE_FLAGS "-wd4611")
endif()

target_link_libraries(grassplugin${GRASS_BUILD_VERSION}
target_link_libraries(plugin_grass${GRASS_BUILD_VERSION}
qgisgrass${GRASS_BUILD_VERSION}
qgis_app
qgis_gui
${OPENPTY_LIBRARY}
)

if (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
target_link_libraries(grassplugin${GRASS_BUILD_VERSION} ulog)
target_link_libraries(plugin_grass${GRASS_BUILD_VERSION} ulog)
endif()

# override default path where built files are put to allow running qgis without installing
@@ -228,7 +228,7 @@ macro(ADD_GRASSPLUGIN GRASS_BUILD_VERSION)
########################################################
# Install

install(TARGETS grassplugin${GRASS_BUILD_VERSION}
install(TARGETS plugin_grass${GRASS_BUILD_VERSION}
RUNTIME DESTINATION ${QGIS_PLUGIN_DIR}
LIBRARY DESTINATION ${QGIS_PLUGIN_DIR})

@@ -24,16 +24,16 @@ else()
QT5_WRAP_UI(offline_editing_plugin_UIS_H ${offline_editing_plugin_UIS})
endif()

add_library (offlineeditingplugin MODULE
add_library (plugin_offlineediting MODULE
${offline_editing_plugin_SRCS}
${offline_editing_plugin_RCCS}
${offline_editing_plugin_UIS_H}
)

# require c++17
target_compile_features(offlineeditingplugin PRIVATE cxx_std_17)
target_compile_features(plugin_offlineediting PRIVATE cxx_std_17)

target_link_libraries(offlineeditingplugin
target_link_libraries(plugin_offlineediting
qgis_core
qgis_gui
${SPATIALITE_LIBRARY}
@@ -53,7 +53,7 @@ include_directories(
########################################################
# Install

install(TARGETS offlineeditingplugin
install(TARGETS plugin_offlineediting
RUNTIME DESTINATION ${QGIS_PLUGIN_DIR}
LIBRARY DESTINATION ${QGIS_PLUGIN_DIR}
)
@@ -27,10 +27,10 @@ else()
QT5_WRAP_UI (topol_UIS_H ${topol_UIS})
endif()

add_library (topolplugin MODULE ${topol_SRCS} ${topol_RCCS} ${topol_UIS_H})
add_library (plugin_topology MODULE ${topol_SRCS} ${topol_RCCS} ${topol_UIS_H})

# require c++17
target_compile_features(topolplugin PRIVATE cxx_std_17)
target_compile_features(plugin_topology PRIVATE cxx_std_17)

include_directories(SYSTEM
${GEOS_INCLUDE_DIR}
@@ -43,7 +43,7 @@ include_directories(
${CMAKE_CURRENT_BINARY_DIR}
)

target_link_libraries(topolplugin
target_link_libraries(plugin_topology
qgis_core
qgis_gui
)
@@ -52,7 +52,7 @@ target_link_libraries(topolplugin
########################################################
# Install

install(TARGETS topolplugin
install(TARGETS plugin_topology
RUNTIME DESTINATION ${QGIS_PLUGIN_DIR}
LIBRARY DESTINATION ${QGIS_PLUGIN_DIR})

0 comments on commit 725dcb3

Please sign in to comment.