Skip to content

Add support for cross compiling from linux for windows (only header-only libraries supported) #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 29, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions blocks/boost/install/install.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -136,18 +136,20 @@ function(__BII_BOOST_INSTALL)
set(BII_BOOST_DOWNLOAD_URL "http://sourceforge.net/projects/boost/files/boost/${BII_BOOST_VERSION}/${BII_BOOST_PACKAGE}" ${SCOPE})

#Bootstrap
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
if((CMAKE_SYSTEM_NAME MATCHES "Windows") AND (NOT CMAKE_CROSSCOMPILING))
set(__BII_BOOST_BOOSTRAPER ${BII_BOOST_DIR}/bootstrap.bat ${SCOPE})
set(__BII_BOOST_B2 ${BII_BOOST_DIR}/b2.exe ${SCOPE})
set(__DYNLIB_EXTENSION .dll ${SCOPE})
elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
else()
set(__BII_BOOST_BOOSTRAPER ${BII_BOOST_DIR}/bootstrap.sh ${SCOPE})
set(__BII_BOOST_B2 ${BII_BOOST_DIR}/b2 ${SCOPE})
set(__DYNLIB_EXTENSION .dylib ${SCOPE})
endif()

if(CMAKE_SYSTEM_NAME MATCHES "Windows")
set(__DYNLIB_EXTENSION .dll ${SCOPE})
elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
set(__DYNLIB_EXTENSION .dylib ${SCOPE})
elseif(CMAKE_SYSTEM_NAME MATCHES "Linux")
set(__BII_BOOST_BOOSTRAPER ${BII_BOOST_DIR}/bootstrap.sh ${SCOPE})
set(__BII_BOOST_B2 ${BII_BOOST_DIR}/b2 ${SCOPE})
set(__DYNLIB_EXTENSION .so ${SCOPE})
set(__DYNLIB_EXTENSION .so ${SCOPE})
else()
message(FATAL_ERROR "Unknown platform. Stopping Boost installation")
endif()
Expand Down