vcpkg/ports/yoga/Export-unofficial-yoga-config.patch

34 lines
954 B
Diff
Raw Normal View History

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