mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 20:19:00 +08:00
72d66da23b
Fixes #36889. * Fix usage error: ``` C:\source\repos\CMakeUsage\CMakeUsage\CMakeUsage.cpp(2,10): error C1083: Cannot open include file: 'libredwg/dwg.h': No such file or directory ``` * Cleanup redundant patches: `fix_arm64_build.patch`. - [x] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md). - [x] SHA512s are updated for each updated download. - [ ] ~The "supports" clause reflects platforms that may be fixed by this new version.~ - [ ] ~Any fixed [CI baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt) entries are removed from that file.~ - [ ] ~Any patches that are no longer applied are deleted from the port's directory.~ - [x] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [x] Only one version is added to each modified port's versions file. All features are tested successfully in the following triplet: ``` x86-windows x64-windows x64-windows-static ``` The usage test passed on `x64-windows` (header files found): ``` libredwg provides CMake targets: find_package(unofficial-libredwg CONFIG REQUIRED) target_link_libraries(main unofficial::libredwg::libredwg) ``` --------- Co-authored-by: Monica <v-liumonica@microsoft.com>
27 lines
865 B
Diff
27 lines
865 B
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 2e854f2..ec2ec1d 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -282,6 +282,8 @@ target_include_directories(${redwg} PUBLIC
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
|
$<INSTALL_INTERFACE:include>)
|
|
|
|
+find_path(JSMN_INCLUDE_DIRS "jsmn.h")
|
|
+target_include_directories(${redwg} PRIVATE ${JSMN_INCLUDE_DIRS})
|
|
link_libraries(${redwg} ${LIBS} ${CMAKE_THREAD_LIBS_INIT})
|
|
|
|
if(NOT LIBREDWG_LIBONLY)
|
|
diff --git a/src/in_json.c b/src/in_json.c
|
|
index d66f1ab..724505b 100644
|
|
--- a/src/in_json.c
|
|
+++ b/src/in_json.c
|
|
@@ -51,7 +51,7 @@ static unsigned int loglevel;
|
|
// In strict mode an object or array can't become a key
|
|
// In strict mode primitives are: numbers and booleans
|
|
#undef JSMN_STRICT
|
|
-#include "../jsmn/jsmn.h"
|
|
+#include "jsmn.h"
|
|
|
|
typedef struct jsmntokens
|
|
{
|