-
Notifications
You must be signed in to change notification settings - Fork 36
/
CMakeLists.txt
44 lines (35 loc) · 1.1 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
cmake_minimum_required(VERSION 2.8.9)
project (dukluv)
include(duktape.cmake)
include(uv.cmake)
add_library(duv
src/duv.c
src/refs.c
src/utils.c
src/loop.c
src/req.c
src/handle.c
src/timer.c
src/stream.c
src/tcp.c
src/pipe.c
src/tty.c
src/fs.c
src/misc.c
src/utils.c
src/uv_schema.c
src/callbacks.c
src/miniz.c
)
add_library(dschema
src/schema.c
)
add_executable(dukluv src/main.c)
target_link_libraries(dukluv duv dschema duktape uv)
set(CMAKE_INSTALL_NAME_DIR ${LIB_INSTALL_DIR})
SET (BIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE STRING "Directory where lib will install")
SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE STRING "Directory where lib will install")
SET (INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "The directory the headers are installed in")
install(TARGETS duv dschema duktape uv DESTINATION ${LIB_INSTALL_DIR})
install(TARGETS dukluv DESTINATION ${BIN_INSTALL_DIR})
install(FILES src/refs.h src/duv.h lib/duktape/src-separate/duk_config.h lib/duktape/src-separate/duktape.h DESTINATION ${INCLUDE_INSTALL_DIR}/duv)