Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

CMake fixes, Boost 1.51.0 and VS 2012 support.

  • Loading branch information...
commit dae58cd7d239a9a39d0adc09ad749105b809fd70 1 parent 53826c6
@ignacio authored
View
20 CMakeLists.txt
@@ -1,16 +1,28 @@
PROJECT(LuaNode C CXX)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-FIND_PACKAGE(Lua51 REQUIRED)
-FIND_PACKAGE(OpenSSL REQUIRED)
-FIND_PACKAGE(Threads REQUIRED)
+FIND_PACKAGE( Lua51 REQUIRED )
+FIND_PACKAGE( OpenSSL REQUIRED )
+FIND_PACKAGE( Threads REQUIRED )
+SET( BOOST_MIN_VERSION "1.44.0" )
+
+# We want to statically link the multithreaded versions. And we don't want Boost auto-link feature
+# since it doesn't play nice with CMake
SET( Boost_USE_STATIC_LIBS ON )
SET( Boost_USE_MULTITHREADED ON )
SET( Boost_USE_STATIC_RUNTIME OFF )
ADD_DEFINITIONS( -DBOOST_ALL_NO_LIB )
-FIND_PACKAGE(Boost COMPONENTS system date_time thread REQUIRED)
+# boost::thread since version 1.50 relies on boost::chrono
+# So check which Boost version is available and look for the required libs
+FIND_PACKAGE( Boost )
+SET( local_boost_version "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}" )
+IF (${local_boost_version} VERSION_GREATER "1.49")
+ FIND_PACKAGE( Boost ${BOOST_MIN_VERSION} COMPONENTS system date_time thread chrono REQUIRED )
+ELSE()
+ FIND_PACKAGE( Boost ${BOOST_MIN_VERSION} COMPONENTS system date_time thread REQUIRED )
+ENDIF()
FIND_PROGRAM(LUA NAMES lua-5.1 lua5.1 lua)
View
1  src/luanode_crypto.h
@@ -8,6 +8,7 @@
#include <openssl/hmac.h>
#include <boost/asio/ssl.hpp>
+#include <boost/array.hpp>
namespace LuaNode {
View
1  src/luanode_datagram_udp.h
@@ -7,6 +7,7 @@
#include <boost/shared_ptr.hpp>
#include <boost/enable_shared_from_this.hpp>
+#include <boost/array.hpp>
namespace LuaNode {
View
1  src/luanode_net.h
@@ -7,6 +7,7 @@
#include <boost/shared_ptr.hpp>
#include <boost/enable_shared_from_this.hpp>
+#include <boost/array.hpp>
namespace LuaNode {
Please sign in to comment.
Something went wrong with that request. Please try again.