-
-
Notifications
You must be signed in to change notification settings - Fork 228
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 82c4f3e8108..881a39c19ec 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -273,6 +273,7 @@ if(WITH_CORE) | ||
|
||
# try to configure and build POLY2TRI support | ||
set (WITH_INTERNAL_POLY2TRI TRUE CACHE BOOL "Determines whether POLY2TRI should be built from internal copy") | ||
+ set (WITH_INTERNAL_MESHOPTIMIZER TRUE CACHE BOOL "Determines whether MESHOPTIMIZER should be built from internal copy") | ||
|
||
# try to configure and build POSTGRESQL support | ||
set (WITH_POSTGRESQL TRUE CACHE BOOL "Determines whether POSTGRESQL support should be built") | ||
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt | ||
index 03a4571d701..8ca44867dd5 100644 | ||
--- a/src/core/CMakeLists.txt | ||
+++ b/src/core/CMakeLists.txt | ||
@@ -19,6 +19,18 @@ if (WITH_PDF4QT) | ||
SUBDIRS(${CMAKE_SOURCE_DIR}/external/PDF4QT) | ||
endif() | ||
|
||
+if(WITH_INTERNAL_MESHOPTIMIZER) | ||
+ add_library(STATIC meshoptimizer::meshoptimizer | ||
+ ${CMAKE_SOURCE_DIR}/external/meshOptimizer/simplifier.cpp | ||
+ ) | ||
+ | ||
+ target_include_directories(meshoptimizer::meshoptimizer | ||
+ ${CMAKE_SOURCE_DIR}/external/meshOptimizer | ||
+ ) | ||
+else() | ||
+ find_package(meshoptimizer CONFIG REQUIRED) | ||
+endif() | ||
+ | ||
set(QGIS_CORE_SRCS | ||
${CMAKE_SOURCE_DIR}/external/kdbush/include/kdbush.hpp | ||
|
||
@@ -30,8 +42,6 @@ set(QGIS_CORE_SRCS | ||
${CMAKE_SOURCE_DIR}/external/nmea/time.c | ||
${CMAKE_SOURCE_DIR}/external/nmea/tok.c | ||
|
||
- ${CMAKE_SOURCE_DIR}/external/meshOptimizer/simplifier.cpp | ||
- | ||
${FLEX_QgsExpressionLexer_OUTPUTS} | ||
${BISON_QgsExpressionParser_OUTPUTS} | ||
${FLEX_QgsSqlStatementLexer_OUTPUTS} | ||
@@ -2436,7 +2446,6 @@ target_include_directories(qgis_core PUBLIC | ||
${CMAKE_SOURCE_DIR}/external/kdbush/include | ||
${CMAKE_SOURCE_DIR}/external/nmea | ||
${CMAKE_SOURCE_DIR}/external/rtree/include | ||
- ${CMAKE_SOURCE_DIR}/external/meshOptimizer | ||
${CMAKE_SOURCE_DIR}/external/tinygltf | ||
) | ||
|
||
@@ -2551,6 +2560,7 @@ target_link_libraries(qgis_core | ||
${EXIV2_LIBRARY} | ||
PROJ::proj | ||
nlohmann_json::nlohmann_json | ||
+ meshoptimizer::meshoptimizer | ||
) | ||
|
||
if(BUILD_WITH_QT6) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,7 @@ | |
}, | ||
"libxml2", | ||
"libzip", | ||
"meshoptimizer", | ||
"proj", | ||
"protobuf", | ||
{ | ||
|