Added support for build with aiksaurus

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@29398 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Kornel Benko 2009-04-25 13:33:55 +00:00
parent f087798732
commit ee1b324d65
4 changed files with 55 additions and 1 deletions

View File

@ -373,9 +373,14 @@ else()
include(ConfigureChecks.cmake) include(ConfigureChecks.cmake)
configure_file(configCompiler.h.cmake ${CMAKE_BINARY_DIR}/configCompiler.h) configure_file(configCompiler.h.cmake ${CMAKE_BINARY_DIR}/configCompiler.h)
endif() endif()
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()
configure_file(config.h.cmake ${CMAKE_BINARY_DIR}/config.h) configure_file(config.h.cmake ${CMAKE_BINARY_DIR}/config.h)
find_package(ICONV REQUIRED) find_package(ICONV REQUIRED)
add_definitions(-DHAVE_ICONV=1) add_definitions(-DHAVE_ICONV=1)

View File

@ -41,5 +41,7 @@
#cmakedefine USE_MACOSX_PACKAGING 1 #cmakedefine USE_MACOSX_PACKAGING 1
#cmakedefine PATH_MAX ${PATH_MAX} #cmakedefine PATH_MAX ${PATH_MAX}
#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,9 @@ if (MINGW)
target_link_libraries(${_lyx} ole32) target_link_libraries(${_lyx} ole32)
endif() endif()
if (AIKSAURUSLIB_LIBRARY)
target_link_libraries(${_lyx} ${AIKSAURUSLIB_LIBRARY})
endif()
project_source_group("${GROUP_CODE}" lyx_sources lyx_headers) project_source_group("${GROUP_CODE}" lyx_sources lyx_headers)
install(TARGETS ${_lyx} DESTINATION bin) install(TARGETS ${_lyx} DESTINATION bin)