Commit a27e8269 authored by Dan Lipsa's avatar Dan Lipsa
Browse files

Use dynamic linking for boost on Windows

parent 8e77ea5e
set(las_cmake_args
-DWITH_GDAL:BOOL=FALSE
-DWITH_GEOTIFF:BOOL=FALSE
-DWITH_LASZIP:BOOL=FALSE
-DWITH_TESTS:BOOL=FALSE
-DWITH_UTILITIES:BOOL=FALSE)
# las sets, on windows, different boost options than the default
if(WIN32 AND MSVC)
list(APPEND las_cmake_args -DBoost_USE_STATIC_LIBS:BOOL=FALSE)
endif()
superbuild_add_project(las
DEPENDS boost
CMAKE_ARGS
-DWITH_GDAL:BOOL=FALSE
-DWITH_GEOTIFF:BOOL=FALSE
-DWITH_LASZIP:BOOL=FALSE
-DWITH_TESTS:BOOL=FALSE
-DWITH_UTILITIES:BOOL=FALSE)
${las_cmake_args}
)
# this patch is commited upstream at 4dbc30a7e7e099cbe01a7c192ec19d231cc26894
superbuild_apply_patch(las respect-with-geotiff
"find_package GeoTIFF only if WITH_GEOTIFF")
superbuild_apply_patch(las enable-outside-boost-options
"Enable outside boost options")
if (APPLE)
superbuild_append_flags(cxx_flags "-stdlib=libc++" PROJECT_ONLY)
superbuild_append_flags(ld_flags "-stdlib=libc++" PROJECT_ONLY)
......
From b7bb8cde2b874e888b3a1b40233e44c76593eee1 Mon Sep 17 00:00:00 2001
From: Dan Lipsa <dan.lipsa@kitware.com>
Date: Mon, 23 Oct 2017 17:37:33 -0400
Subject: [PATCH] Enable outside packages to set boost options.
---
CMakeLists.txt | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 82fc991a..032b5e49 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -190,8 +190,12 @@ message(STATUS "Searching for Boost 1.38+ - done")
# on windows in the compilation documentation.
if(WIN32)
if (MSVC)
- set(Boost_USE_STATIC_LIBS ON)
- set(Boost_USE_MULTITHREADED ON)
+ if (NOT DEFINED Boost_USE_STATIC_LIBS)
+ set(Boost_USE_STATIC_LIBS ON)
+ endif()
+ if (NOT DEFINED Boost_USE_MULTITHREADED)
+ set(Boost_USE_MULTITHREADED ON)
+ endif()
endif(MSVC)
endif(WIN32)
--
2.11.0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment