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
../modules/filter/url.cpp
../modules/filter/genconv.cpp
-
-### msvc win32 support
- ../win32/libstub.cpp
)
file(GLOB commons_headers ../common/*.hpp)
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)
########################################################################
add_executable(aspellexe ${aspell_SOURCES})
-target_link_libraries(aspellexe aspell ole32)
-
+if(WIN32)
+ target_link_libraries(aspellexe aspell ole32)
+endif(WIN32)
########################################################################
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
+++ /dev/null
-/*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);
-
-