mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-18 15:47:52 +08:00
60 lines
1.2 KiB
Diff
60 lines
1.2 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 4dd6454..eda6a72 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -8,7 +8,7 @@ else()
|
|
cmake_policy(VERSION 3.12)
|
|
endif()
|
|
|
|
-cmake_minimum_required (VERSION 3.0)
|
|
+cmake_minimum_required (VERSION 3.14)
|
|
cmake_policy(SET CMP0048 NEW)
|
|
|
|
project(upb)
|
|
@@ -62,6 +62,7 @@ enable_testing()
|
|
|
|
add_library(port
|
|
upb/port.c)
|
|
+add_library(descriptor_upbproto INTERFACE)
|
|
add_library(upb
|
|
upb/decode.c
|
|
upb/encode.c
|
|
@@ -154,6 +155,7 @@ target_link_libraries(upb_cc_bindings INTERFACE
|
|
handlers
|
|
port
|
|
upb)
|
|
+if(ENABLE_TESTING)
|
|
add_library(upb_test
|
|
tests/testmain.cc
|
|
tests/test_util.h
|
|
@@ -162,5 +164,28 @@ target_link_libraries(upb_test
|
|
handlers
|
|
port
|
|
upb)
|
|
+endif()
|
|
|
|
-
|
|
+install(
|
|
+ DIRECTORY upb
|
|
+ DESTINATION include
|
|
+ FILES_MATCHING
|
|
+ PATTERN "*.h"
|
|
+ PATTERN "*.hpp"
|
|
+ PATTERN "*.inc"
|
|
+ PATTERN "*.int.h"
|
|
+)
|
|
+target_include_directories(upb PUBLIC $<INSTALL_INTERFACE:include>)
|
|
+install(TARGETS
|
|
+ upb
|
|
+ upb_cc_bindings
|
|
+ upb_json
|
|
+ upb_pb
|
|
+ port
|
|
+ table
|
|
+ descriptor_upbproto
|
|
+ handlers
|
|
+ reflection
|
|
+ EXPORT upb-config
|
|
+)
|
|
+install(EXPORT upb-config NAMESPACE upb:: DESTINATION share/upb)
|