mirror of https://github.com/microsoft/vcpkg.git
[libredwg] Fix the usage error and cleanup patch (#36912)
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>
This commit is contained in:
parent
911218eefc
commit
72d66da23b
|
|
@ -1,17 +1,14 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 8906fed..e953b76 100644
|
||||
index ec2ec1d..910f61c 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -11,8 +11,11 @@ if(MSVC)
|
||||
set(redwg libredwg)
|
||||
# Disable some overly strict MSVC warnings.
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -wd4244 -wd4800 -wd4805 -wd4101 -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS")
|
||||
-else()
|
||||
+ else()
|
||||
@@ -16,6 +16,9 @@ if(MSVC)
|
||||
else()
|
||||
set(redwg redwg)
|
||||
+ endif()
|
||||
endif()
|
||||
+if(MSVC AND CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64")
|
||||
+ add_compile_options(/Gy)
|
||||
endif()
|
||||
+endif()
|
||||
|
||||
if (EXISTS ".version")
|
||||
file(READ .version NL_PACKAGE_VERSION)
|
||||
|
|
|
|||
|
|
@ -1,12 +1,11 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 8263f23..8906fed 100644
|
||||
index 2e854f2..ec2ec1d 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -201,7 +201,8 @@ target_include_directories(${redwg} PRIVATE
|
||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
|
||||
target_include_directories(${redwg} PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
|
||||
-
|
||||
@@ -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})
|
||||
|
|
|
|||
|
|
@ -1,37 +1,31 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index f0e04be..8263f23 100644
|
||||
index cbf9341..2e854f2 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -196,10 +196,11 @@ if (BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(${redwg} PUBLIC DLL_EXPORT;ENABLE_SHARED)
|
||||
endif()
|
||||
target_include_directories(${redwg} PRIVATE
|
||||
- ${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
- ${CMAKE_CURRENT_BINARY_DIR}/src)
|
||||
+ PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
|
||||
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/src>
|
||||
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
|
||||
@@ -279,7 +279,8 @@ target_include_directories(${redwg} PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
${CMAKE_CURRENT_BINARY_DIR}/src)
|
||||
target_include_directories(${redwg} PUBLIC
|
||||
- ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
|
||||
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
+ $<INSTALL_INTERFACE:include>)
|
||||
|
||||
link_libraries(${redwg} ${LIBS} ${CMAKE_THREAD_LIBS_INIT})
|
||||
|
||||
@@ -309,7 +310,7 @@ add_custom_target(
|
||||
COMMAND etags --language=c++ *.c *.h
|
||||
@@ -390,6 +391,7 @@ add_custom_target(
|
||||
DEPENDS ${SRCS}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
|
||||
-
|
||||
|
||||
+if(0)
|
||||
if(MSVC)
|
||||
install(TARGETS ${redwg} RUNTIME PUBLIC_HEADER
|
||||
DESTINATION libredwg-${PACKAGE_VERSION})
|
||||
@@ -331,7 +332,21 @@ else()
|
||||
@@ -411,6 +413,22 @@ else()
|
||||
endif()
|
||||
endif()
|
||||
install(TARGETS RUNTIME)
|
||||
-
|
||||
+endif()
|
||||
+
|
||||
+include(GNUInstallDirs)
|
||||
+install(
|
||||
+ TARGETS ${redwg}
|
||||
|
|
@ -46,6 +40,6 @@ index f0e04be..8263f23 100644
|
|||
+ DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
||||
+endif()
|
||||
+install(EXPORT libredwg-core FILE unofficial-libredwg-config.cmake NAMESPACE unofficial::libredwg:: DESTINATION share/unofficial-libredwg)
|
||||
|
||||
if(WIN32)
|
||||
add_custom_target(dist
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/README README
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"name": "libredwg",
|
||||
"version": "0.13.2",
|
||||
"port-version": 1,
|
||||
"description": "GNU LibreDWG is a free C library to handle DWG files. It aims to be a free replacement for the OpenDWG libraries. DWG is the native file format of AutoCAD.",
|
||||
"homepage": "https://www.gnu.org/software/libredwg/",
|
||||
"license": "GPL-3.0",
|
||||
|
|
|
|||
|
|
@ -4794,7 +4794,7 @@
|
|||
},
|
||||
"libredwg": {
|
||||
"baseline": "0.13.2",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"libremidi": {
|
||||
"baseline": "4.3.0",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "5b81de86b90979544e2a5cd3f958556cd5d9917a",
|
||||
"version": "0.13.2",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "7e772e358eee3f6d61854c67c7a4a8afa0a952b8",
|
||||
"version": "0.13.2",
|
||||
|
|
|
|||
Loading…
Reference in New Issue