fix find_package(json5-parser ...) issue (#8401)

This commit is contained in:
zi-m 2019-10-03 00:51:41 +02:00 committed by Griffin Downs
parent 3db8ce2d66
commit 16a2ec4e99
4 changed files with 5 additions and 10 deletions

View File

@ -1,5 +1,5 @@
diff --git a/json5_parser/CMakeLists.txt b/json5_parser/CMakeLists.txt diff --git a/json5_parser/CMakeLists.txt b/json5_parser/CMakeLists.txt
index e83fb38..b193c97 100644 index e83fb38..c09cae4 100644
--- a/json5_parser/CMakeLists.txt --- a/json5_parser/CMakeLists.txt
+++ b/json5_parser/CMakeLists.txt +++ b/json5_parser/CMakeLists.txt
@@ -15,3 +15,22 @@ INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR}) @@ -15,3 +15,22 @@ INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR})
@ -12,12 +12,12 @@ index e83fb38..b193c97 100644
+ +
+target_include_directories(json5_parser PUBLIC $<INSTALL_INTERFACE:include>) +target_include_directories(json5_parser PUBLIC $<INSTALL_INTERFACE:include>)
+ +
+install(TARGETS json5_parser EXPORT json5_parser-config +install(TARGETS json5_parser EXPORT json5-parser-config
+ RUNTIME DESTINATION bin + RUNTIME DESTINATION bin
+ ARCHIVE DESTINATION lib + ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib + LIBRARY DESTINATION lib
+) +)
+install(EXPORT json5_parser-config DESTINATION share/cmake/json5_parser) +install(EXPORT json5-parser-config DESTINATION share/cmake/json5-parser)
+ +
+file(GLOB HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} json5_parser*.h) +file(GLOB HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} json5_parser*.h)
+foreach (HEADER ${HEADERS} ) +foreach (HEADER ${HEADERS} )

View File

@ -1,5 +1,5 @@
Source: json5-parser Source: json5-parser
Version: 1.0.0 Version: 1.0.0-1
Homepage: https://bitbucket.org/wlandry/json5_parser Homepage: https://bitbucket.org/wlandry/json5_parser
Description: An enhancement of the JSON Spirit C++ library to understand json5. Description: An enhancement of the JSON Spirit C++ library to understand json5.
Build-Depends: boost-spirit Build-Depends: boost-spirit

View File

@ -18,10 +18,9 @@ vcpkg_configure_cmake(
vcpkg_install_cmake() vcpkg_install_cmake()
vcpkg_copy_pdbs() vcpkg_copy_pdbs()
vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/json5_parser) vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/json5-parser)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
configure_file(${SOURCE_PATH}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/json5-parser/copyright COPYONLY) configure_file(${SOURCE_PATH}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/json5-parser/copyright COPYONLY)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/json5-parser)

View File

@ -1,4 +0,0 @@
The package json5-parser provides CMake targets:
find_package(json5_parser CONFIG REQUIRED)
target_link_libraries(main PRIVATE json5_parser)