Skip to content

Commit 907975d

Browse files
authored
cmake supporting
1 parent 311e5d1 commit 907975d

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

CMakeLists.txt

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
2+
cmake_minimum_required(VERSION 3.4.1)
3+
project(ancillary C)
4+
5+
set(CMAKE_C_STANDARD 11)
6+
7+
set(LIB_ANCILLARY_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "ancillary library path" FORCE)
8+
9+
include_directories(.)
10+
11+
add_library(
12+
ancillary
13+
STATIC
14+
ancillary.h
15+
fd_recv.c
16+
fd_send.c
17+
)
18+
19+
option(libancillary_build_test OFF)
20+
21+
if (libancillary_build_test)
22+
add_executable(
23+
test_exe
24+
test.c
25+
)
26+
target_link_libraries(
27+
test_exe
28+
ancillary
29+
)
30+
add_executable(
31+
evclient
32+
evclient.c
33+
)
34+
target_link_libraries(
35+
evclient
36+
ancillary
37+
)
38+
add_executable(
39+
evserver
40+
evserver.c
41+
)
42+
target_link_libraries(
43+
evserver
44+
ancillary
45+
)
46+
endif (libancillary_build_test)

0 commit comments

Comments
 (0)