Commit 95315818 authored by Stanislav Bohm's avatar Stanislav Bohm

ENH: build script updated

parent 24a1c504
......@@ -2,6 +2,20 @@ project(loom-rt)
cmake_minimum_required(VERSION 2.8)
enable_testing()
# LibUV
find_path(LIBUV_INCLUDE_DIR uv.h
HINTS ${PC_LIBUV_INCLUDEDIR} ${PC_LIBUV_INCLUDE_DIRS}
${LIMIT_SEARCH})
find_library(LIBUV_LIBRARY
NAMES libuv uv)
mark_as_advanced(LIBUV_INCLUDE_DIR LIBUV_LIBRARY)
# Protobuffers
find_package(Protobuf REQUIRED)
include_directories(${PROTOBUF_INCLUDE_DIRS})
add_subdirectory(src)
add_subdirectory(tests)
......
......@@ -33,5 +33,6 @@ add_library(libloom
types.h
utils.h
utils.cpp)
target_include_directories(libloom PUBLIC ${PROJECT_SOURCE_DIR}/src)
......@@ -23,4 +23,7 @@ add_executable(loom-server
$<TARGET_OBJECTS:loom-server-lib>
main.cpp)
target_link_libraries(loom-server libloom uv protobuf pthread)
target_link_libraries(loom-server libloom ${LIBUV_LIBRARY} pthread)
target_link_libraries(loom-server ${PROTOBUF_LIBRARIES})
install (TARGETS loom-server DESTINATION bin)
......@@ -8,4 +8,6 @@ add_executable(loom-worker
basictasks.h
main.cpp)
target_include_directories(loom-worker PUBLIC ${PROJECT_SOURCE_DIR})
target_link_libraries(loom-worker libloom uv protobuf pthread)
target_link_libraries(loom-worker libloom ${LIBUV_LIBRARY} pthread)
target_link_libraries(loom-worker ${PROTOBUF_LIBRARIES})
install (TARGETS loom-worker DESTINATION bin)
......@@ -7,7 +7,10 @@ add_executable(server-test
$<TARGET_OBJECTS:loom-server-lib>
scheduler.cpp
main.cpp)
target_link_libraries(server-test Catch libloom uv protobuf pthread)
target_link_libraries(server-test Catch libloom ${LIBUV_LIBRARY} pthread)
target_link_libraries(server-test ${PROTOBUF_LIBRARIES})
target_include_directories(server-test PUBLIC ${PROJECT_SOURCE_DIR})
add_test(NAME server-test COMMAND server-test)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment