vcpkg/ports/yoga/Export-unofficial-yoga-config.patch
Cheney Wang 517adc7517
[yoga] Add unofficial-yoga-config.cmake (#25417)
* [yoga] Add unofficial-yoga-config.cmake

* x-add-version

Co-authored-by: Cheney-Wang <v-xincwa@microsoft.com>
2022-07-05 15:52:53 -07:00

34 lines
954 B
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index c6f4a83..7cee74a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -21,6 +21,26 @@ add_compile_options(
file(GLOB_RECURSE yogacore_SRC yoga/*.cpp)
add_library(yogacore STATIC ${yogacore_SRC})
-target_include_directories(yogacore PUBLIC .)
+target_include_directories(yogacore PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}>
+ $<INSTALL_INTERFACE:include>
+)
target_link_libraries(yogacore android log)
set_target_properties(yogacore PROPERTIES CXX_STANDARD 11)
+
+install(TARGETS yogacore EXPORT unofficial-yoga-config
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+)
+
+install(EXPORT unofficial-yoga-config
+ FILE unofficial-yoga-config.cmake
+ NAMESPACE unofficial::yoga::
+ DESTINATION share/unofficial-yoga
+)
+
+install(DIRECTORY ${CMAKE_SOURCE_DIR}/yoga
+ DESTINATION include
+ FILES_MATCHING
+ PATTERN *.h
+)
\ No newline at end of file