diff options
author | jacobkeeler <jacob.keeler@livioradio.com> | 2018-02-07 11:39:45 -0500 |
---|---|---|
committer | jacobkeeler <jacob.keeler@livioradio.com> | 2018-02-07 11:39:45 -0500 |
commit | 8ba002752267452e6efd0d78aa1c77e89e32bb01 (patch) | |
tree | d0279be9fa1eab334b47b91c3b9c3c655e9e0c3a | |
parent | 600928d833b7a09307d69d69ed4a8fbfc75e5437 (diff) | |
download | sdl_core-8ba002752267452e6efd0d78aa1c77e89e32bb01.tar.gz |
Don't use sudo when installing boost into a custom directoryfix/boost_install_sudo
-rw-r--r-- | src/3rd_party/CMakeLists.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/3rd_party/CMakeLists.txt b/src/3rd_party/CMakeLists.txt index d243ec98e3..b97c05f7f9 100644 --- a/src/3rd_party/CMakeLists.txt +++ b/src/3rd_party/CMakeLists.txt @@ -215,6 +215,10 @@ if (HMIADAPTER STREQUAL "messagebroker") set(BOOST_INCLUDE_DIRECTORY ${3RD_PARTY_INSTALL_PREFIX}/include ) if (NOT ${Boost_FOUND}) message(STATUS "Did not find boost. Downloading and installing boost 1.66") + set(BOOST_INSTALL_COMMAND ./b2 install) + if (${3RD_PARTY_INSTALL_PREFIX} MATCHES "/usr/local") + set(BOOST_INSTALL_COMMAND sudo ./b2 install) + endif() include(ExternalProject) ExternalProject_Add( Boost @@ -223,7 +227,7 @@ if (HMIADAPTER STREQUAL "messagebroker") SOURCE_DIR ${BOOST_LIB_SOURCE_DIRECTORY} CONFIGURE_COMMAND ./bootstrap.sh --with-libraries=system --prefix=${3RD_PARTY_INSTALL_PREFIX} BUILD_COMMAND ./b2 - INSTALL_COMMAND sudo ./b2 install --with-system --prefix=${3RD_PARTY_INSTALL_PREFIX} + INSTALL_COMMAND ${BOOST_INSTALL_COMMAND} --with-system --prefix=${3RD_PARTY_INSTALL_PREFIX} INSTALL_DIR ${3RD_PARTY_INSTALL_PREFIX} BUILD_IN_SOURCE true ) |