include(ConfigureChecks.cmake)
configure_file(configCompiler.h.cmake ${CMAKE_BINARY_DIR}/configCompiler.h)
endif()
+find_package(MyThesLIB)
+if(MYTHESLIB_FOUND)
+ # Variables in config.h will be set correctly with configure_file()
+ set(HAVE_LIBMYTHES 1)
+ set(MYTHES_H_LOCATION 1)
+endif()
configure_file(config.h.cmake ${CMAKE_BINARY_DIR}/config.h)
-
find_package(ICONV REQUIRED)
add_definitions(-DHAVE_ICONV=1)
#cmakedefine USE_MACOSX_PACKAGING 1
#cmakedefine PATH_MAX ${PATH_MAX}
+#cmakedefine HAVE_LIBMYTHES 1
+#cmakedefine MYTHES_H_LOCATION <${MYTHES_H}>
#endif
--- /dev/null
+#
+# based on FindZLIB.cmake
+# created 2009, Kornel Benko, <kornel.benko@berlin.de>
+#
+
+set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
+
+if (MYTHESLIB_INCLUDE_DIR)
+ # Already in cache, be silent
+ set(MYTHESLIB_FIND_QUIETLY TRUE)
+endif()
+
+set(MYTHES_H mythes.hxx)
+find_path(MYTHESLIB_INCLUDE_DIR ${MYTHES_H}
+ /usr/include
+ /usr/local/include)
+
+set(POTENTIAL_MYTHES_LIBS mythes)
+
+find_library(MYTHESLIB_LIBRARY NAMES ${POTENTIAL_MYTHES_LIBS}
+ PATHS
+ /usr/lib /usr/local/lib)
+
+if(MYTHESLIB_INCLUDE_DIR AND MYTHESLIB_LIBRARY)
+ set(MYTHESLIB_FOUND TRUE)
+endif()
+
+if(MYTHESLIB_FOUND)
+ if(NOT MYTHESLIB_FIND_QUIETLY)
+ message(STATUS "Found MYTHES: ${MYTHESLIB_LIBRARY}")
+ endif()
+else()
+ if(MYTHESLIB_FIND_REQUIRED)
+ message(STATUS "Looked for MYTHES libraries named ${POTENTIAL_MYTHES_LIBS}.")
+ message(STATUS "Found no acceptable MYTHES library. This is fatal.")
+ endif()
+endif()
+
+mark_as_advanced(MYTHESLIB_LIBRARY MYTHESLIB_INCLUDE_DIR)
${TOP_SRC_DIR}/src/Section.cpp)
if (ASPELL_FOUND)
- include_directories(${ASPELL_INCLUDE_DIR})
- set(lyx_sources ${lyx_sources} ${TOP_SRC_DIR}/src/ASpell.cpp)
+ include_directories(${ASPELL_INCLUDE_DIR})
+ list(APPEND lyx_sources ${TOP_SRC_DIR}/src/ASpell.cpp)
endif()
include_directories(${CMAKE_CURRENT_BINARY_DIR}
lyx_add_msvc_pch(lyx)
-if (NOT MERGE_FILES)
- set(lyx_sources ${lyx_sources})
-else()
- lyx_const_touched_files(_allinone lyx_sources)
- set(lyx_sources ${_allinone_files})
+if (MERGE_FILES)
+ lyx_const_touched_files(_allinone lyx_sources)
+ set(lyx_sources ${_allinone_files})
endif()
if (LYX_LEAK_DETECTION)
target_link_libraries(${_lyx} ole32)
endif()
+if (MYTHES_LIBS)
+ target_link_libraries(${_lyx} ${MYTHESLIB_LIBRARY})
+endif()
+
project_source_group("${GROUP_CODE}" lyx_sources lyx_headers)
install(TARGETS ${_lyx} DESTINATION bin)