1
0
mirror of https://github.com/fumiama/simple-protobuf.git synced 2026-06-15 14:43:51 +08:00
Files
simple-protobuf/CMakeLists.txt
2021-05-18 16:27:16 +08:00

17 lines
465 B
CMake

cmake_minimum_required(VERSION 2.6)
project(simple-protobuf C)
include(TestBigEndian)
test_big_endian(isBigEndian)
if (${isBigEndian})
add_definitions(-DWORDS_BIGENDIAN)
endif()
add_library(spb SHARED protobuf.c)
add_library(spb_static STATIC protobuf.c)
add_executable(t test.c)
target_link_libraries(t spb)
INSTALL(TARGETS spb LIBRARY DESTINATION lib)
INSTALL(TARGETS spb_static ARCHIVE DESTINATION lib)
INSTALL(FILES simple_protobuf.h DESTINATION include)