From b6158cd6ebad77f90c53a3a4f89bd1d3e16b452c Mon Sep 17 00:00:00 2001
From: Martin Beseda <martin.beseda@vsb.cz>
Date: Sat, 2 Feb 2019 19:58:02 +0100
Subject: [PATCH] FIX: Fixing downloading dependencies by CMake

---
 DownloadBoost.cmake | 4 ++--
 FindBoost.cmake     | 2 +-
 build.sh            | 1 -
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/DownloadBoost.cmake b/DownloadBoost.cmake
index 43952dbf..fd4704d8 100644
--- a/DownloadBoost.cmake
+++ b/DownloadBoost.cmake
@@ -48,7 +48,7 @@ if(NOT rv STREQUAL "0")
 endif()
 
 execute_process(
-    COMMAND ${B2_CMD} header
+    COMMAND ${B2_CMD} headers
     WORKING_DIRECTORY ${BOOST_LOCAL_PATH}
     RESULT_VARIABLE rv
 )
@@ -57,7 +57,7 @@ if(NOT rv STREQUAL "0")
 endif()
 
 execute_process(
-    COMMAND ${B2_CMD} -q cxxflags=-fPIC --layout=system variant=debug link=${LINK_TYPE} address-model=64 --with-system --with-serialization --with-random
+    COMMAND ${B2_CMD} -q cxxflags=-fPIC --layout=system variant=debug link=${DEPENDENCIES_LINK_TYPE} address-model=64 --with-system --with-serialization --with-random
     WORKING_DIRECTORY ${BOOST_LOCAL_PATH}
     RESULT_VARIABLE rv
 )
diff --git a/FindBoost.cmake b/FindBoost.cmake
index 03f37d5a..31093241 100644
--- a/FindBoost.cmake
+++ b/FindBoost.cmake
@@ -159,7 +159,7 @@ else()
             # Add every found library as an IMPORTED target
             string(TOUPPER ${DEPENDENCIES_LINK_TYPE} TMP)
             string(REGEX REPLACE "^lib" "" TARGET_NAME ${LIBNAME})
-            string(REGEX REPLACE "\.[a-z]*$" "" TARGET_NAME ${TARGET_NAME})
+            string(REGEX REPLACE "\\.[a-z]*$" "" TARGET_NAME ${TARGET_NAME})
             add_library(${TARGET_NAME} ${TMP} IMPORTED)
             set_target_properties(${TARGET_NAME} PROPERTIES IMPORTED_LOCATION ${${LIBNAME}})
             message("Created IMPORTED library target: ${TARGET_NAME}")
diff --git a/build.sh b/build.sh
index c38d9b18..e2579203 100755
--- a/build.sh
+++ b/build.sh
@@ -5,7 +5,6 @@ export CLEAN_AFTER=no
 #./clean.sh
 
 cd build_scripts/linux
-./download_dependencies.sh
 export DEPENDENCIES_LINK_TYPE=static
 ./linux_gcc_build_x64_debug_local.sh
 cd ../..
-- 
GitLab