Added support for Aiksaurus-build

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29399 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Kornel Benko 2009-04-25 13:43:52 +00:00
parent 3a502dfbec
commit 1b0d8fd5f1
4 changed files with 58 additions and 0 deletions

View File

@ -377,6 +377,13 @@ if(MYTHESLIB_FOUND)
# Variables in config.h will be set correctly with configure_file() # Variables in config.h will be set correctly with configure_file()
set(HAVE_LIBMYTHES 1) set(HAVE_LIBMYTHES 1)
set(MYTHES_H_LOCATION 1) set(MYTHES_H_LOCATION 1)
else()
find_package(AiksaurusLIB)
if(AIKSAURUSLIB_FOUND)
# Variables in config.h will be set correctly with configure_file()
set(HAVE_LIBAIKSAURUS 1)
set(AIKSAURUS_H_LOCATION 1)
endif()
endif() endif()
configure_file(config.h.cmake ${CMAKE_BINARY_DIR}/config.h) configure_file(config.h.cmake ${CMAKE_BINARY_DIR}/config.h)

View File

@ -44,4 +44,7 @@
#cmakedefine HAVE_LIBMYTHES 1 #cmakedefine HAVE_LIBMYTHES 1
#cmakedefine MYTHES_H_LOCATION <${MYTHES_H}> #cmakedefine MYTHES_H_LOCATION <${MYTHES_H}>
#cmakedefine HAVE_LIBAIKSAURUS 1
#cmakedefine AIKSAURUS_H_LOCATION <${AIKSAURUS_H}>
#endif #endif

View File

@ -0,0 +1,44 @@
#
# based on FindZLIB.cmake
# created 2009, Kornel Benko, <kornel.benko@berlin.de>
#
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
if (AIKSAURUS_INCLUDE_DIR)
# Already in cache, be silent
set(AIKSAURUS_FIND_QUIETLY TRUE)
endif()
find_path(AIKSAURUS_INCLUDE_DIR NAMES Aiksaurus.h
PATH_SUFFIXES "" "Aiksaurus")
if(AIKSAURUS_INCLUDE_DIR)
if(AIKSAURUS_INCLUDE_DIR MATCHES "Aiksaurus")
set(AIKSAURUS_H Aiksaurus/Aiksaurus.h)
else()
set(AIKSAURUS_H Aiksaurus.h)
endif()
endif()
set(POTENTIAL_AIKSAURUS_LIBS Aiksaurus)
find_library(AIKSAURUSLIB_LIBRARY NAMES ${POTENTIAL_AIKSAURUS_LIBS}
PATHS
/usr/lib /usr/local/lib)
if(AIKSAURUS_INCLUDE_DIR AND AIKSAURUSLIB_LIBRARY)
set(AIKSAURUSLIB_FOUND TRUE)
endif()
if(AIKSAURUSLIB_FOUND)
if(NOT AIKSAURUS_FIND_QUIETLY)
message(STATUS "Found AIKSAURUS: ${AIKSAURUSLIB_LIBRARY}")
endif()
else()
if(AIKSAURUS_FIND_REQUIRED)
message(STATUS "Looked for AIKSAURUS libraries named ${POTENTIAL_AIKSAURUS_LIBS}.")
message(STATUS "Found no acceptable AIKSAURUS library. This is fatal.")
endif()
endif()
mark_as_advanced(AIKSAURUSLIB_LIBRARY AIKSAURUSLIB_INCLUDE_DIR)

View File

@ -85,6 +85,10 @@ endif()
if (MYTHESLIB_LIBRARY) if (MYTHESLIB_LIBRARY)
target_link_libraries(${_lyx} ${MYTHESLIB_LIBRARY}) target_link_libraries(${_lyx} ${MYTHESLIB_LIBRARY})
else()
if (AIKSAURUSLIB_LIBRARY)
target_link_libraries(${_lyx} ${AIKSAURUSLIB_LIBRARY})
endif()
endif() endif()
project_source_group("${GROUP_CODE}" lyx_sources lyx_headers) project_source_group("${GROUP_CODE}" lyx_sources lyx_headers)