This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to tag v1.0.0
in repository osmium-tool.

commit c9a4464d14dc71c204ae54eb0c426650e72a560b
Author: alex85k <alex...@github.com>
Date:   Tue Aug 26 12:06:55 2014 +0600

    minimal fix for windows compilation
---
 CMakeLists.txt | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 611e8cf..03680a7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -68,7 +68,7 @@ if(NOT PROTOBUF_FOUND)
 endif()
 
 find_package(Boost COMPONENTS program_options REQUIRED)
-include_directories(${BOOST_INCLUDE_DIRS})
+include_directories(${Boost_INCLUDE_DIRS})
 list(APPEND LIBRARIES ${Boost_LIBRARIES})
 if(NOT Boost_FOUND)
     message(WARNING "Boost program_options not found!\n")
@@ -108,6 +108,7 @@ if(MISSING_LIB)
     message(FATAL_ERROR "Required library or libraries missing. Aborting...")
 endif(MISSING_LIB)
 
+
 #----------------------------------------------------------------------
 #
 #  Optional "cppcheck" target that checks C++ code
@@ -214,9 +215,12 @@ include_directories(${PROJECT_BINARY_DIR}/src)
 #----------------------------------------------------------------------
 add_definitions(-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64)
 
-add_compile_options(-std=c++11)
-
-add_compile_options(
+if (MSVC)
+    add_definitions(-wd4996 -DNOMINMAX -DWIN32_LEAN_AND_MEAN 
-D_CRT_SECURE_NO_WARNINGS)
+    list(APPEND LIBRARIES ws2_32)
+else()
+  add_compile_options(-std=c++11)
+  add_compile_options(
     -Wall
     -Wextra
     -pedantic
@@ -227,11 +231,12 @@ add_compile_options(
     -Woverloaded-virtual
     -Wsign-promo
     -Wold-style-cast
-)
+  )
+  #always compile with optimization, even in debug mode
+  set(CMAKE_CXX_FLAGS_DEBUG -O3)
+  set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g")
+endif()
 
-# always compile with optimization, even in debug mode
-set(CMAKE_CXX_FLAGS_DEBUG -O3)
-set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g")
 
 if(APPLE)
     add_compile_options(-stdlib=libc++)

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-grass/osmium-tool.git

_______________________________________________
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel

Reply via email to