-
Notifications
You must be signed in to change notification settings - Fork 5
/
CMakeLists.txt
36 lines (27 loc) · 929 Bytes
/
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
cmake_minimum_required(VERSION 2.8.3)
project(neovim_client_cpp)
find_package(Boost 1.55.0 REQUIRED COMPONENTS system coroutine context thread)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y")
set(MSGPACK_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external/msgpack-c)
#add_subdirectory(${MSGPACK_SOURCE_DIR})
set(CMAKE_CXX_FLAGS "-DMSGPACK_USE_BOOST ${CMAKE_CXX_FLAGS}") #TODO: import every flags directly from msgpack-c
include_directories(
include
gen
${Boost_INCLUDE_DIR}
${MSGPACK_SOURCE_DIR}/include
)
add_executable(test
src/main.cpp
src/socket.cpp
)
target_link_libraries(test ${Boost_LIBRARIES})
find_package(PythonInterp)
if (PYTHONINTERP_FOUND)
add_custom_target(auto_gen_api
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/gen_api.py
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMENT "Autogen nvim interface"
)
endif()
add_dependencies(test auto_gen_api)