On 22.01.2011 17:50, Stephan Witt wrote:
Am 22.01.2011 um 16:54 schrieb Peter Kümmel:

On 22.01.2011 16:46, Stephan Witt wrote:
Peter,

is it possible to add extra library/include file search paths?

If I want to debug the aspell/hunspell I have to use my private builds on Mac.

I want to pass it as options from command line, otherwise I have to change the
e. g. FindASPELL.cmake to build with aspell support.


Are your changes so specific to your setup that they could not get upstream?

I think so, it's a build directory below a sibling of the lyx checkout.
But how should it look like to be acceptable for getting upstream?
May I set an optional variable as path prefix and add it?

Currently we have:
/usr/include
/usr/local/include
/usr/local/include/aspell
${_program_FILES_DIR}/gnuwin32/include

perhaps

+=
${PRIVATE_BUILD_DIR}/include

Stephan

Or attached patch?

cmake . -DLYX_ADD_INCLUDES=/x/y/z;/a/b/c

Peter
Index: development/cmake/CMakeLists.txt
===================================================================
--- development/cmake/CMakeLists.txt	(revision 37302)
+++ development/cmake/CMakeLists.txt	(working copy)
@@ -52,6 +52,7 @@
 LYX_OPTION(QUIET "Don't generate verbose makefiles" OFF ALL)
 LYX_OPTION(INSTALL_PREFIX "Install path for LyX" OFF ALL)
 LYX_OPTION(EXTERNAL_LIBINTL "Use external libintl" ON ALL)
+LYX_OPTION(ADD_INCLUDES "Add addition include directories (\; separated)" ON ALL)
 
 # GCC specific
 LYX_OPTION(PROFILE "Build profile version" OFF GCC)
@@ -99,8 +100,11 @@
 set(EXECUTABLE_OUTPUT_PATH  ${CMAKE_BINARY_DIR}/bin)
 set(LIBRARY_OUTPUT_PATH  ${CMAKE_BINARY_DIR}/lib)
 
+if(LYX_ADD_INCLUDES)
+	message(STATUS "Adding addition include directories: ${LYX_ADD_INCLUDES}")
+	include_directories(${LYX_ADD_INCLUDES})
+endif()
 
-
 if(UNIX OR MINGW)
 	execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
 	message(STATUS "Using GCC version ${GCC_VERSION}")

Reply via email to