diff --git a/.gitignore b/.gitignore index 8de6f0d719..118b21487c 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,28 @@ *.so.?.?.? *.a *.dylib +lib/* + +# CMake +*.cmake +*.dir +CMakeFiles +INSTALL.* +ZERO_CHECK.* +CMakeCache.txt +install_manifest.txt + +# Windows/Visual Studio +*.vcproj* +*.sln +*.suo +*.ncb +*/Debug/* +*/*/Debug/* +*/Release/* +*/*/Release/* +*/RelWithDebInfo/* +*/*/RelWithDebInfo/* objs_shared/ objs_static/ diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000000..70edccefb7 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,195 @@ + +############ Setup project and cmake + +# Project name +project (websocketpp) + +# Minimum cmake requirement. We should require a quite recent +# cmake for the dependency find macros etc. to be up to date. +cmake_minimum_required (VERSION 2.5) + +# Set CMake library search policy +if (COMMAND cmake_policy) + cmake_policy (SET CMP0003 NEW) + cmake_policy (SET CMP0005 NEW) +endif () + +# Disable unnecessary build types +set (CMAKE_CONFIGURATION_TYPES "Release;RelWithDebInfo;Debug" CACHE STRING "Configurations" FORCE) + +# Include our cmake macros +set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) +include (CMakeHelpers) + + +############ Build customization + +# Override from command line "CMake -D