From: Peter Kümmel Date: Thu, 7 Sep 2006 09:06:07 +0000 (+0000) Subject: - remove static_filters: fix crash of the aspell executable by using only cygwin... X-Git-Tag: 1.6.10~12635 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=1b2f441860c3cba8850c3bf97eee03d62c77a397;p=features.git - remove static_filters: fix crash of the aspell executable by using only cygwin generated files - CMakelists.txt: add shared lib option (mingw only) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14922 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/development/Win32/aspell/CMakeLists.txt b/development/Win32/aspell/CMakeLists.txt index 3665e2b51b..ce20c67838 100644 --- a/development/Win32/aspell/CMakeLists.txt +++ b/development/Win32/aspell/CMakeLists.txt @@ -1,6 +1,17 @@ project(aspell) +if(${LINK} MATCHES "shared" OR ASPELL_LINK) + set(ASPELL_SHARED_LIB 1) + set(ASPELL_LINK SHARED CACHE TYPE STRING) +else(${LINK} MATCHES "shared" OR ASPELL_LINK) + MESSAGE(STATUS) + MESSAGE(STATUS "Use -DLINK=shared to build the libraries as shared") + MESSAGE(STATUS) + set(ASPELL_LINK STATIC) +endif(${LINK} MATCHES "shared" OR ASPELL_LINK) + + ######################################################################## # # Aspell Library @@ -82,9 +93,6 @@ set(libaspell_sources ../modules/filter/url.cpp ../modules/filter/genconv.cpp - -### msvc win32 support - ../win32/libstub.cpp ) file(GLOB commons_headers ../common/*.hpp) @@ -134,9 +142,18 @@ if(MSVC) SET(CMAKE_C_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE}) endif(MSVC) -add_definitions(-DWIN32PORT) -add_library(aspell STATIC ${libaspell_sources} ${commons_headers}) +if(WIN32) + ### msvc win32 support + set(libaspell_sources ${libaspell_sources} ../win32/libstub.cpp) + add_definitions(-DWIN32PORT) +endif(WIN32) +add_library(aspell ${ASPELL_LINK} ${libaspell_sources} ${commons_headers}) + + +if(WIN32) + target_link_libraries(aspell ole32) +endif(WIN32) ######################################################################## @@ -152,8 +169,9 @@ set(aspell_SOURCES add_executable(aspellexe ${aspell_SOURCES}) -target_link_libraries(aspellexe aspell ole32) - +if(WIN32) + target_link_libraries(aspellexe aspell ole32) +endif(WIN32) ######################################################################## diff --git a/development/Win32/aspell/Readme.txt b/development/Win32/aspell/Readme.txt index 5cdd8ce4ac..bef876e047 100644 --- a/development/Win32/aspell/Readme.txt +++ b/development/Win32/aspell/Readme.txt @@ -1,18 +1,20 @@ Aspell on Windows -You need cmake and cygwin. +You need cmake and cygwin (with Unix line endings!!). - check out the latest CVS version: http://savannah.gnu.org/cvs/?group=aspell -- copy the files from the LyX SVN to the other - files in the win32 folder of aspell +- first build with cygwin to autogenerate + all required files: + ./autogen + ./configure + ./make + +- copy the files from the LyX SVN aspell/win32 - with cygwin patch aspell, call in aspell/: patch -p0 -i win32/win32-aspell.patch - -- generate missing source files with cygwin: - ./autogen - make a separate build directory and run on a standard Windows command promp diff --git a/development/Win32/aspell/static_filters.src.cpp b/development/Win32/aspell/static_filters.src.cpp deleted file mode 100644 index 7e7fe8c2e3..0000000000 --- a/development/Win32/aspell/static_filters.src.cpp +++ /dev/null @@ -1,36 +0,0 @@ -/*File generated during static filter build - Automatically generated file -*/ - - extern "C" IndividualFilter * new_aspell_url_filter(); - - static FilterEntry standard_filters[] = { - {"url",0,new_aspell_url_filter,0} - }; - - const unsigned int standard_filters_size = sizeof(standard_filters)/sizeof(FilterEntry); - - static KeyInfo url_options[] = { - "" - }; - - const KeyInfo * url_options_begin = url_options; - - const KeyInfo * url_options_end = url_options+sizeof(url_options)/sizeof(KeyInfo); - - - static ConfigModule filter_modules[] = { - { - "url",0, - "filter to skip URL like constructs", - url_options_begin,url_options_end - } - }; - - const ConfigModule * filter_modules_begin = filter_modules; - - const ConfigModule * filter_modules_end = filter_modules+sizeof(filter_modules)/sizeof(ConfigModule); - - const size_t filter_modules_size = sizeof(filter_modules); - -