2018-03-19 17:28:24 +00:00
|
|
|
cmake_minimum_required(VERSION 3.10)
|
2018-03-19 05:44:23 +00:00
|
|
|
project(esc C)
|
|
|
|
|
|
|
|
set(CMAKE_C_STANDARD 99)
|
|
|
|
|
2018-03-19 17:28:24 +00:00
|
|
|
if(WIN32)
|
|
|
|
include_directories(c:/Users/nicol/dev/thirdparty/protobuf-c)
|
|
|
|
link_directories(c:/Users/nicol/dev/thirdparty/protobuf-c/protobuf-c/.libs)
|
|
|
|
endif()
|
2018-03-19 05:44:23 +00:00
|
|
|
|
2018-03-19 17:28:24 +00:00
|
|
|
add_executable(esc src/main.c src/mutex.c src/mutex.h src/thread.c src/thread.h src/socket.c src/socket.h src/esc.c src/esc.h src/proto.c src/proto.h src/uuid.c src/uuid.h src/buffer.c src/buffer.h src/tcp_package.c src/tcp_package.h)
|
2018-03-19 05:44:23 +00:00
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
target_link_libraries(esc wsock32 ws2_32 libprotobuf-c.a)
|
2018-03-19 17:28:24 +00:00
|
|
|
else()
|
|
|
|
target_link_libraries(esc protobuf-c)
|
2018-03-19 05:44:23 +00:00
|
|
|
endif()
|