pkgconf: work around for buggy FindOpenSSL.cmake

FindOpenSSL.cmake bundled with cmake older than 2.8.12-rc1 uses
CMAKE_CROSS_COMPILING, which is incorrect because the real variable name
is CMAKE_CROSSCOMPILING. Because it is not possible to modify users'
CMake installation, work around it here.

This fixes building libwebsockets on Ubuntu 13.10. (I only tested 14.04
when merging the pull request.)

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
This commit is contained in:
Timothy Gu 2014-09-21 19:29:33 -07:00
parent 866dddfaaf
commit 51db0500d1
1 changed files with 2 additions and 1 deletions

View File

@ -60,7 +60,8 @@ define $(PKG)_BUILD_COMMON
echo 'set(PKG_CONFIG_EXECUTABLE $(PREFIX)/bin/$(TARGET)-pkg-config)'; \
echo 'set(QT_QMAKE_EXECUTABLE $(PREFIX)/$(TARGET)/qt/bin/qmake)'; \
echo 'set(CMAKE_INSTALL_PREFIX $(PREFIX)/$(TARGET) CACHE PATH "Installation Prefix")'; \
echo 'set(CMAKE_BUILD_TYPE Release CACHE STRING "Debug|Release|RelWithDebInfo|MinSizeRel")') \
echo 'set(CMAKE_BUILD_TYPE Release CACHE STRING "Debug|Release|RelWithDebInfo|MinSizeRel")'; \
echo 'set(CMAKE_CROSS_COMPILING ON) # Workaround for http://www.cmake.org/Bug/view.php?id=14075') \
> '$(CMAKE_TOOLCHAIN_FILE)'
endef