|
1 | 1 | cmake_minimum_required(VERSION 2.8.9) |
2 | 2 |
|
3 | | -# IncludeOS install location |
4 | | -if (NOT DEFINED ENV{INCLUDEOS_PREFIX}) |
5 | | - set(ENV{INCLUDEOS_PREFIX} /usr/local) |
6 | | -endif() |
| 3 | +add_definitions(-DARCH_${ARCH}) |
| 4 | +add_definitions(-DARCH="${ARCH}") |
7 | 5 |
|
8 | | -include($ENV{INCLUDEOS_PREFIX}/includeos/pre.service.cmake) |
| 6 | +include_directories(${INCLUDEOS_ROOT}/api/posix) |
| 7 | +include_directories(${LIBCXX_INCLUDE_DIR}) |
| 8 | +include_directories(${NEWLIB_INCLUDE_DIR}) |
| 9 | +include_directories(${INCLUDEOS_ROOT}/src/include) |
| 10 | +include_directories(${INCLUDEOS_ROOT}/api) |
| 11 | +include_directories(${INCLUDEOS_ROOT}/mod/GSL/) |
9 | 12 |
|
10 | | -# Name of your project |
11 | | -project (uplink) |
| 13 | +#dependencies |
| 14 | +include_directories(${INCLUDEOS_ROOT}/lib/LiveUpdate) |
| 15 | +include_directories(${INCLUDEOS_ROOT}/mod/rapidjson/include) |
12 | 16 |
|
13 | | -# Name of your IncludeOS library |
14 | | -set(LIBRARY_NAME "uplink") # => libseed.a |
| 17 | +set(LIBRARY_NAME "uplink") |
15 | 18 |
|
16 | | -# Source files to be built into your IncludeOS library |
17 | 19 | set(SOURCES |
18 | | - transport.cpp # ...add more here |
| 20 | + transport.cpp |
19 | 21 | ws_uplink.cpp |
20 | 22 | register_plugin.cpp |
21 | 23 | ) |
22 | 24 |
|
23 | | -# Necessary includes to build your library |
24 | | -set(LOCAL_INCLUDES |
25 | | - # "include" |
26 | | - ) |
27 | | - |
28 | | -# include library build script |
29 | | -include($ENV{INCLUDEOS_PREFIX}/includeos/library.cmake) |
30 | | - |
31 | | - |
32 | | -# INSTALLATION (OPTIONAL): |
33 | | - |
34 | | -# If CMAKE_INSTALL_PREFIX is not set, install to source directory |
35 | | -if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) |
36 | | - set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}") # $ENV{INCLUDEOS_PREFIX}/includeos |
37 | | -endif() |
38 | | - |
39 | | -# Where to install library |
40 | | -install(TARGETS ${LIBRARY_NAME} DESTINATION $ENV{INCLUDEOS_PREFIX}/includeos/${ARCH}/plugins) |
| 25 | +add_library(${LIBRARY_NAME} STATIC ${SOURCES}) |
41 | 26 |
|
42 | | -# Where to install library headers |
43 | | -# NOTE: There is a difference between installing a list of files and a directory |
44 | | -# set(LIBRARY_HEADERS "include/seed") |
45 | | -# install(DIRECTORY ${LIBRARY_HEADERS} DESTINATION ${CMAKE_INSTALL_PREFIX}/include) |
| 27 | +install(TARGETS ${LIBRARY_NAME} DESTINATION includeos/${ARCH}/plugins) |
0 commit comments