-
Notifications
You must be signed in to change notification settings - Fork 13
/
CMakeLists.txt
74 lines (62 loc) · 1.49 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
cmake_minimum_required(VERSION 2.8)
project(mjpeg_server)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
find_package(Boost COMPONENTS
thread
system
regex
REQUIRED
)
if (Boost_FOUND)
message(STATUS "Boost headers at ${Boost_INCLUDE_DIRS}")
message(STATUS "Boost libraries at ${Boost_LIBRARIES}")
endif()
add_subdirectory(json_spirit)
find_package(OpenCV REQUIRED)
include_directories(
${Boost_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
)
add_library(ecto_streamer_serv SHARED
connection.cpp
mime_types.cpp
reply.cpp
request_handler.cpp
request_parser.cpp
server.cpp
mjpeg_server.cpp
)
target_link_libraries(ecto_streamer_serv
${OpenCV_LIBS}
boost_thread boost_system boost_regex
)
set_target_properties(ecto_streamer_serv PROPERTIES
COMPILE_FLAGS "-fpic -Wall -Werror"
)
add_executable(httpserv main.cpp)
target_link_libraries(httpserv
ecto_streamer_serv
)
set_target_properties(httpserv PROPERTIES
COMPILE_FLAGS "-fpic -Wall -Werror"
)
install(TARGETS ecto_streamer_serv
DESTINATION lib
COMPONENT main
)
find_package(ecto)
if(ecto_FOUND)
ecto_python_env_gen(${CMAKE_BINARY_DIR}/lib)
ectomodule(mjpeg_server
module.cpp
cell_parameter_handlers.cpp
)
link_ecto(mjpeg_server
ecto_streamer_serv
streamer_json_spirit
boost_thread boost_system boost_regex
${OpenCV_LIBS}
)
install_ecto_module(mjpeg_server)
endif()