summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllen Winter <allen.winter@kdab.com>2018-11-12 17:43:35 -0500
committerAllen Winter <allen.winter@kdab.com>2018-11-12 17:43:35 -0500
commit1df99c144db05965a51f98f58ef8455927a137d4 (patch)
tree44b8fae4f19e0ad0a0c88b5517e58f7a59056c64
parenta949148d9fca18f7a9fbf84cb331aad8ec53ec8a (diff)
parent2c343926f73d8327ad159a70d15134aed60d54da (diff)
downloadlibical-git-jengelh-master.tar.gz
Merge branch 'master' into jengelh-masterjengelh-master
-rw-r--r--.travis.yml3
-rw-r--r--Install.txt14
-rw-r--r--cmake/modules/GtkDoc.cmake11
-rwxr-xr-xscripts/buildtests.sh9
-rwxr-xr-xscripts/setup-travis.sh1
5 files changed, 30 insertions, 8 deletions
diff --git a/.travis.yml b/.travis.yml
index 13092c62..3ac6f746 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,8 @@
env:
global:
- secure: "NlWO/NTPlOU6cowOMuPOvjAprXVwIjmpHHf9CoMR71E2c/eBFFKIHj10kXuyFwz2KihHAIExmo9OlGtGniNWobvIrVrabO3dsOSb6UGbPAQkzQiyQLKsDNQAZx3nMuWEKBtMsVRee6rd7/2uGTY4WB5Ot3VhrUYcN1FoRgQQ9gk="
- - PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig # needed to find homebrew's libffi on osx
+ - PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig:/usr/local/opt/libxml2/lib/pkgconfig # needed to find homebrew's libxml2 an libffi on osx
+ - XML_CATALOG_FILES=/usr/local/etc/xml/catalog # homebrew installed libxml2 catalog
os:
diff --git a/Install.txt b/Install.txt
index 9df6cf3e..62c1d5bb 100644
--- a/Install.txt
+++ b/Install.txt
@@ -73,6 +73,20 @@ For example, say you want to use Clang to build on Linux.
Then you can set the C and C++ compilers at CMake time, like so:
% CC=clang CXX=clang++ cmake ..
+== Building for OSX (Mac) ==
+Homebrew:
+ A couple of necessary dependencies do not have their headers
+ and development libraries linked into /usr/local/{include,lib} due
+ to possible contamination with the operating system versions of the
+ same name. This is known to be the case with libffi and libxml2
+ Fix is to export PKG_CONFIG_PATH so CMake can find them, as in:
+ export PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig:\
+ /usr/local/opt/libxml2/lib/pkgconfig
+
+ Also, if building the gtkdocs you'll need to say where the xml
+ catalog files can be found so the gtk entities are located, like so:
+ export XML_CATALOG_FILES=/usr/local/etc/xml/catalog
+
== Optional Dependencies ==
* libicu "International Components for Unicode" development libraries.
Highly recommended for RSCALE support.
diff --git a/cmake/modules/GtkDoc.cmake b/cmake/modules/GtkDoc.cmake
index c480b86f..dbeedade 100644
--- a/cmake/modules/GtkDoc.cmake
+++ b/cmake/modules/GtkDoc.cmake
@@ -59,9 +59,10 @@ macro(add_gtkdoc _module _namespace _deprecated_guards _srcdirsvar _depsvar _ign
list(APPEND _filedeps ${_files})
endforeach()
- set(_mkhtml_prefix "")
if(APPLE)
- set(_mkhtml_prefix "${CMAKE_COMMAND} -E env XML_CATALOG_FILES=\"/usr/local/etc/xml/catalog\"")
+ if(NOT DEFINED ENV{XML_CATALOG_FILES})
+ message(FATAL_ERROR "On OSX, please run \'export XML_CATALOG_FILES=/usr/local/etc/xml/catalog\' first; else the gtk entities cannot be located.")
+ endif()
endif()
set(_scangobj_deps)
@@ -70,8 +71,8 @@ macro(add_gtkdoc _module _namespace _deprecated_guards _srcdirsvar _depsvar _ign
set(_scangobj_ldflags "")
set(_scangobj_ld_lib_dirs "")
- list(APPEND _scangobj_cflags_list -I${INCLUDE_INSTALL_DIR})
- list(APPEND _scangobj_ldflags -L${LIB_INSTALL_DIR})
+ list(APPEND _scangobj_cflags_list -I${CMAKE_INSTALL_PREFIX}/${INCLUDE_INSTALL_DIR})
+ list(APPEND _scangobj_ldflags -L${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR})
foreach(opt IN LISTS ${_depsvar})
if(TARGET ${opt})
@@ -164,7 +165,7 @@ macro(add_gtkdoc _module _namespace _deprecated_guards _srcdirsvar _depsvar _ign
COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/html"
- COMMAND ${CMAKE_COMMAND} -E chdir "${CMAKE_CURRENT_BINARY_DIR}/html" ${_mkhtml_prefix} ${GTKDOC_MKHTML} --path=.. ${_module} ../${_module}-docs.sgml
+ COMMAND ${CMAKE_COMMAND} -E chdir "${CMAKE_CURRENT_BINARY_DIR}/html" ${GTKDOC_MKHTML} --path=.. ${_module} ../${_module}-docs.sgml
COMMAND ${GTKDOC_FIXXREF}
--module=${_module}
diff --git a/scripts/buildtests.sh b/scripts/buildtests.sh
index 07f7ff3d..a8aedbf9 100755
--- a/scripts/buildtests.sh
+++ b/scripts/buildtests.sh
@@ -10,8 +10,13 @@ set -o pipefail
#ensure parallel builds
export MAKEFLAGS=-j8
-#needed to find homebrew's libffi on osx
-export PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig
+if (test "`uname -s`" = "Darwin")
+then
+ #needed to find homebrew's libxml2 and libffi on osx
+ export PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig:/usr/local/opt/libxml2/lib/pkgconfig
+ #needed to find the homebrew installed xml2 catalog
+ export XML_CATALOG_FILES=/usr/local/etc/xml/catalog
+fi
##### START FUNCTIONS #####
diff --git a/scripts/setup-travis.sh b/scripts/setup-travis.sh
index 36705b78..e74e1937 100755
--- a/scripts/setup-travis.sh
+++ b/scripts/setup-travis.sh
@@ -4,6 +4,7 @@
if ( test "`uname -s`" = "Darwin" )
then
+ brew install libxml2
brew install icu4c
brew install db
brew install gobject-introspection