]> git.lyx.org Git - features.git/commitdiff
- remove static_filters: fix crash of the aspell executable by using only cygwin...
authorPeter Kümmel <syntheticpp@gmx.net>
Thu, 7 Sep 2006 09:06:07 +0000 (09:06 +0000)
committerPeter Kümmel <syntheticpp@gmx.net>
Thu, 7 Sep 2006 09:06:07 +0000 (09:06 +0000)
- 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

development/Win32/aspell/CMakeLists.txt
development/Win32/aspell/Readme.txt
development/Win32/aspell/static_filters.src.cpp [deleted file]

index 3665e2b51bcad92a8c6aa1963824f917122019a6..ce20c6783875419352fdf54cea329f6a7127aaa5 100644 (file)
@@ -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)
 
 
 ########################################################################
index 5cdd8ce4acc6656b38165db2b2fce378d6d2e34e..bef876e047d88858905c71be592f7c0a64431632 100644 (file)
@@ -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 (file)
index 7e7fe8c..0000000
+++ /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);
-
-