From 66f8a4c07e8a5fc166579101933264b8425a7cd1 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 29 Aug 2018 14:11:32 +0200 Subject: Build environment: Fix compilation of boost on Linux 32bit --- build_files/build_environment/cmake/boost.cmake | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'build_files') diff --git a/build_files/build_environment/cmake/boost.cmake b/build_files/build_environment/cmake/boost.cmake index 959a6e22637..33bfa1d4e82 100644 --- a/build_files/build_environment/cmake/boost.cmake +++ b/build_files/build_environment/cmake/boost.cmake @@ -63,6 +63,11 @@ else() set(BOOST_BUILD_COMMAND ./b2) set(BOOST_BUILD_OPTIONS cxxflags=${PLATFORM_CXXFLAGS} --disable-icu boost.locale.icu=off) set(BOOST_PATCH_COMMAND echo .) + if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") + set(BOOST_ADDRESS_MODEL 64) + else() + set(BOOST_ADDRESS_MODEL 32) + endif() endif() set(BOOST_OPTIONS -- cgit v1.2.3 From 987b3abeb456fea55d14c8646b6dc253c7eb356c Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 29 Aug 2018 15:05:03 +0200 Subject: CMake: Make sure zlib folder comes first for precompiled Linux libraries Without this find_package(ZLIB) will find ZLib from OpenCollada folder, which has older ABI and is not what was used to link PNG against. --- build_files/cmake/platform/platform_unix.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'build_files') diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake index 74958a8731c..43a06c67373 100644 --- a/build_files/cmake/platform/platform_unix.cmake +++ b/build_files/cmake/platform/platform_unix.cmake @@ -30,7 +30,10 @@ set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_NAME}) if(EXISTS ${LIBDIR}) file(GLOB LIB_SUBDIRS ${LIBDIR}/*) - set(CMAKE_PREFIX_PATH ${LIB_SUBDIRS}) + # NOTE: Make sure "proper" compiled zlib comes first before the one + # which is a part of OpenCollada. They have different ABI, and we + # do need to use the official one. + set(CMAKE_PREFIX_PATH ${LIBDIR}/zlib ${LIB_SUBDIRS}) set(WITH_STATIC_LIBS ON) set(WITH_OPENMP_STATIC ON) endif() -- cgit v1.2.3 From b2c707747da9f930a05499e98874c35d9aee7193 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 29 Aug 2018 15:08:28 +0200 Subject: CMake: Comply with include path reported by FindOpenGL.cmake The script clearly states: This makes the presumption that you are include al.h like #include "al.h" and not #include The reason for this is that the latter is not entirely portable. Windows/Creative Labs does not by default put their headers in AL/ and OS X uses the convention . This commit makes default precompiled OpenAL to be properly detected and also removes hack on MacOS which was finding the OpenAL package but then was overwriting include directory. Note, that new audaspace in 2.8 is using expected #include . --- build_files/cmake/platform/platform_apple.cmake | 1 - build_files/cmake/platform/platform_win32.cmake | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'build_files') diff --git a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platform/platform_apple.cmake index faed0cf25fc..b9c898e60d8 100644 --- a/build_files/cmake/platform/platform_apple.cmake +++ b/build_files/cmake/platform/platform_apple.cmake @@ -43,7 +43,6 @@ if(WITH_OPENAL) find_package(OpenAL) if(OPENAL_FOUND) set(WITH_OPENAL ON) - set(OPENAL_INCLUDE_DIR "${LIBDIR}/openal/include") else() set(WITH_OPENAL OFF) endif() diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake index 1460808038d..07dc3ec0671 100644 --- a/build_files/cmake/platform/platform_win32.cmake +++ b/build_files/cmake/platform/platform_win32.cmake @@ -556,7 +556,7 @@ set(WINTAB_INC ${LIBDIR}/wintab/include) if(WITH_OPENAL) set(OPENAL ${LIBDIR}/openal) set(OPENALDIR ${LIBDIR}/openal) - set(OPENAL_INCLUDE_DIR ${OPENAL}/include) + set(OPENAL_INCLUDE_DIR ${OPENAL}/include/AL) set(OPENAL_LIBPATH ${OPENAL}/lib) if(MSVC) set(OPENAL_LIBRARY ${OPENAL_LIBPATH}/openal32.lib) -- cgit v1.2.3