From cf91489ef40f1853bb5dd46ef50c09e5660ba9a7 Mon Sep 17 00:00:00 2001 From: fumiama Date: Tue, 18 May 2021 16:13:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=84=E8=8C=83=E5=8C=96Cmake?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 745e01a..d4ee7ad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ -cmake_minimum_required(VERSION 3.0.0) -project(simple-protobuf) +cmake_minimum_required(VERSION 2.6) +project(simple-protobuf C) include(TestBigEndian) test_big_endian(isBigEndian) @@ -9,4 +9,7 @@ endif() add_library(spb SHARED protobuf.c) add_executable(t test.c) -target_link_libraries(t spb) \ No newline at end of file +target_link_libraries(t spb) + +INSTALL(TARGETS spb LIBRARY DESTINATION lib) +INSTALL(TARGETS spb PUBLIC_HEADER DESTINATION include)