Finally it compiles
This commit is contained in:
parent
f544faf78d
commit
cf821b1af4
4 changed files with 47 additions and 1 deletions
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
.DS_Store
|
||||||
|
build
|
||||||
|
*.sublime-workspace
|
||||||
|
|
33
CMakeLists.txt
Normal file
33
CMakeLists.txt
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
cmake_minimum_required(VERSION 2.8)
|
||||||
|
|
||||||
|
#include(motor/cmake/set_system_include_flag.cmake)
|
||||||
|
#include(motor/cmake/address_sanitizer.cmake)
|
||||||
|
|
||||||
|
|
||||||
|
#include(motor/cmake/enable_gnu11.cmake)
|
||||||
|
|
||||||
|
#include(motor/cmake/warning_settings.cmake)
|
||||||
|
#get_sane_warning_flags(warnings)
|
||||||
|
|
||||||
|
#include(motor/cmake/join.cmake)
|
||||||
|
#join("${warnings}" " " warnings)
|
||||||
|
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${warnings}")
|
||||||
|
|
||||||
|
|
||||||
|
project(server)
|
||||||
|
|
||||||
|
add_subdirectory(${PROJECT_SOURCE_DIR}/contrib/libwebsockets/)
|
||||||
|
|
||||||
|
|
||||||
|
find_package(Boost 1.48 REQUIRED)
|
||||||
|
include_directories(${Boost_INCLUDE_DIRS})
|
||||||
|
|
||||||
|
set(boost ${Boost_LIBRARIES})
|
||||||
|
|
||||||
|
include_directories("${PROJECT_SOURCE_DIR}")
|
||||||
|
include_directories(SYSTEM "${PROJECT_SOURCE_DIR}/contrib/libwebsockets/")
|
||||||
|
|
||||||
|
set(all_friggin_libraries ${boost} websockets_shared)
|
||||||
|
|
||||||
|
add_executable(server main.cpp)
|
||||||
|
target_link_libraries(server ${all_friggin_libraries})
|
2
main.cpp
2
main.cpp
|
@ -36,7 +36,7 @@
|
||||||
#include "lws_config.h"
|
#include "lws_config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "lib/libwebsockets.h"
|
#include <lib/libwebsockets.h>
|
||||||
|
|
||||||
int force_exit = 0;
|
int force_exit = 0;
|
||||||
|
|
||||||
|
|
9
run
Executable file
9
run
Executable file
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
mkdir -p build
|
||||||
|
cd build
|
||||||
|
cmake ..
|
||||||
|
make -j8
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
./build/server
|
Reference in a new issue