From df4d7167fdd568aa63169d6a948d857a8e62b35e Mon Sep 17 00:00:00 2001 From: Jonne Nauha Date: Wed, 3 Apr 2013 01:56:10 +0300 Subject: [PATCH] CMake continued: Try to detect g++, clang, windows and osx and setup appropriate defines and build flags. Improve so that each setup can define platform, boost and ssl libs. I tried to copy everything that I could from the scons scripts, probably some of this can be removed (might be automated from cmake already), left todo:s for that. Added building simple examples, more to follow. NOTE: This has only been tested on windows. --- .gitignore | 3 + CMakeLists.txt | 129 ++++++++++++++++++++++++---- cmake/CMakeHelpers.cmake | 62 +++++++++++-- examples/CMakeLists.txt | 15 +--- examples/echo_client/CMakeLists.txt | 11 +++ examples/echo_server/CMakeLists.txt | 10 +++ websocketpp/CMakeLists.txt | 17 +--- 7 files changed, 198 insertions(+), 49 deletions(-) create mode 100644 examples/echo_client/CMakeLists.txt create mode 100644 examples/echo_server/CMakeLists.txt diff --git a/.gitignore b/.gitignore index 17581269e7..249c560a12 100644 --- a/.gitignore +++ b/.gitignore @@ -31,8 +31,11 @@ install_manifest.txt *.suo *.ncb */Debug/* +*/*/Debug/* */Release/* +*/*/Release/* */RelWithDebInfo/* +*/*/RelWithDebInfo/* objs_shared/ objs_static/ diff --git a/CMakeLists.txt b/CMakeLists.txt index acc019cc77..70edccefb7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,6 @@ +############ Setup project and cmake + # Project name project (websocketpp) @@ -6,20 +8,98 @@ project (websocketpp) # cmake for the dependency find macros etc. to be up to date. cmake_minimum_required (VERSION 2.5) -# Include our cmake macros -set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} cmake) -include (CMakeHelpers) - -# Build customization: -# - Override from command line "CMake -D