eventstore-client-c/CMakeLists.txt

22 lines
1.4 KiB
CMake
Raw Permalink Normal View History

2018-03-20 05:48:55 +00:00
cmake_minimum_required(VERSION 3.9)
project(evenstore-client-c C)
2018-03-19 05:44:23 +00:00
set(CMAKE_C_STANDARD 99)
add_compile_options(-DDEBUG)
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
add_library(eventstore-client-c src/utils/mutex.c src/utils/mutex.h src/utils/thread.c src/utils/thread.h src/utils/socket.c src/utils/socket.h include/esc.h src/proto.c src/proto.h src/utils/uuid.c src/utils/uuid.h src/utils/buffer.c src/utils/buffer.h src/tcp_package.c src/tcp_package.h src/utils/string.c src/utils/string.h src/utils/queue.c src/utils/queue.h src/tcp_messages.c src/tcp_messages.h src/utils/debug.h src/utils/debug.c src/position.c src/position.h src/credentials.c src/credentials.h src/connection.c src/connection.h src/utils/bool.h src/endpoint_discoverer.h src/utils/error.c src/utils/error.h src/endpoint_discoverer.c src/proto_helper.h src/proto_helper.c src/results.h src/results.c src/event_data.c src/event_data.h src/utils/array.c src/utils/array.h src/utils/event.c src/utils/event.h src/subscription.c src/subscription.h)
2018-03-25 19:18:55 +00:00
add_executable(esc test/main.c include/esc.h)
2018-03-19 05:44:23 +00:00
if(WIN32)
target_link_libraries(eventstore-client-c wsock32 ws2_32)
target_link_libraries(esc eventstore-client-c libprotobuf-c.a)
else()
2018-03-25 19:18:55 +00:00
target_link_libraries(eventstore-client-c pthread)
target_link_libraries(esc pthread eventstore-client-c protobuf-c)
2018-03-19 05:44:23 +00:00
endif()