mirror of
https://github.com/fumiama/simple-protobuf.git
synced 2026-06-09 02:26:19 +08:00
13 lines
295 B
CMake
13 lines
295 B
CMake
cmake_minimum_required(VERSION 3.0.0)
|
|
project(simple-protobuf)
|
|
|
|
include(TestBigEndian)
|
|
test_big_endian(isBigEndian)
|
|
if (${isBigEndian})
|
|
add_library(spb SHARED protobuf_be.c)
|
|
else()
|
|
add_library(spb SHARED protobuf_le.c)
|
|
endif()
|
|
|
|
add_executable(test test.c)
|
|
target_link_libraries(test spb) |