summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Install.txt14
-rw-r--r--cmake/modules/GtkDoc.cmake11
2 files changed, 20 insertions, 5 deletions
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}