3 # default: build rel_0_60-branch
4 # -DCVS_HEAD=1: build cvs HEAD version
7 set(ASPELL_LIB_NAME libaspell)
8 set(ASPELL_EXE_NAME aspell)
10 if(${LINK} MATCHES "shared" OR ASPELL_LINK)
11 set(ASPELL_SHARED_LIB 1)
12 set(ASPELL_LINK SHARED CACHE TYPE STRING)
13 else(${LINK} MATCHES "shared" OR ASPELL_LINK)
15 #MESSAGE(STATUS "Use -DLINK=shared to build the libraries as shared")
17 set(ASPELL_LINK STATIC)
18 endif(${LINK} MATCHES "shared" OR ASPELL_LINK)
22 set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
24 ########################################################################
35 ../common/file_util.cpp
36 ../common/string_map.cpp
37 ../common/string_list.cpp
39 ../common/posib_err.cpp
43 ../common/iostream.cpp
45 ../common/can_have_error.cpp
49 ../common/objstack.cpp
50 ../common/strtonum.cpp
51 ../common/gettext_init.cpp
52 ../common/file_data_util.cpp
53 ../modules/speller/default/readonly_ws.cpp
54 ../modules/speller/default/suggest.cpp
55 ../modules/speller/default/data.cpp
56 ../modules/speller/default/multi_ws.cpp
57 ../modules/speller/default/phonetic.cpp
58 ../modules/speller/default/writable.cpp
59 ../modules/speller/default/speller_impl.cpp
60 ../modules/speller/default/phonet.cpp
61 ../modules/speller/default/typo_editdist.cpp
62 ../modules/speller/default/editdist.cpp
63 ../modules/speller/default/primes.cpp
64 ../modules/speller/default/leditdist.cpp
65 ../modules/speller/default/affix.cpp
66 ../lib/word_list-c.cpp
68 ../lib/mutable_container-c.cpp
70 ../lib/string_map-c.cpp
73 ../lib/string_enumeration-c.cpp
74 ../lib/can_have_error-c.cpp
78 ../lib/string_list-c.cpp
79 ../lib/find_speller.cpp
81 ../lib/string_pair_enumeration-c.cpp
82 ../lib/new_checker.cpp
85 # This is for filters which are ALWAYS static.
86 # The url filter is always usefull and fairly simple.
87 # The genconv filter is mostly defined in the main aspell libarary
88 # since it is used by other filters. The actual genconv filter
89 # is just a small wrapper.
91 ../modules/filter/url.cpp
95 set(libaspell_sources ${libaspell_sources}
96 ../common/tokenizer.cpp
97 ../common/document_checker.cpp
98 ../modules/speller/default/language.cpp
99 ../modules/tokenizer/basic.cpp
101 ../lib/document_checker-c.cpp
105 set(libaspell_sources ${libaspell_sources} ../win32/dirent.c)
108 set(libaspell_sources ${libaspell_sources}
109 ../common/convert_filter.cpp
110 ../common/checker.cpp
111 ../modules/speller/default/checker_impl.cpp
112 ../modules/speller/default/lang_impl.cpp
113 ../lib/speller-cm.cpp
115 ../lib/document_checker-c.cpp
117 ../lib/language-c.cpp
118 ../lib/language_types-c.cpp
119 ../lib/language-cm.cpp
120 ../lib/munch_list.cpp
121 ../modules/filter/genconv.cpp
125 set(CVS_HEAD 1 CACHE TYPE STRING)
129 file(GLOB commons_headers ../common/*.hpp )
131 set(commons_headers ${commons_headers} ../interfaces/cc/aspell.h)
133 if(COMPILE_IN_FILTERS)
135 ### Add your filter sources here,
136 ### starting with file containing filter class definition followed by
137 ### file containing filter member implementation.
138 set(libaspell_sources
140 ../modules/filter/email.cpp
141 ../modules/filter/tex.cpp
142 ../modules/filter/sgml.cpp
143 ../modules/filter/context.cpp
144 ../modules/filter/nroff.cpp
145 ../modules/filter/texinfo.cpp
147 endif(COMPILE_IN_FILTERS)
152 ${CMAKE_SOURCE_DIR}/../win32
153 ${CMAKE_SOURCE_DIR}/../gen
154 ${CMAKE_SOURCE_DIR}/../lib
155 ${CMAKE_SOURCE_DIR}/../common
156 ${CMAKE_SOURCE_DIR}/../modules
157 ${CMAKE_SOURCE_DIR}/../modules/filter
158 ${CMAKE_SOURCE_DIR}/../modules/speller
159 ${CMAKE_SOURCE_DIR}/../modules/speller/default
160 ${CMAKE_SOURCE_DIR}/../interfaces/cc
164 # debug library name: aspelld.lib
165 # release library name: aspell.lib
166 set(CMAKE_DEBUG_POSTFIX "d")
169 SET(CMAKE_EXE_LINKER_FLAGS /MANIFEST)
172 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Zi -wd4522 -wd4521 -wd4996 -wd4800")
173 set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -wd4522 -wd4521 -wd4996 -wd4800")
174 SET(CMAKE_C_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
175 SET(CMAKE_C_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
179 add_definitions(-DWIN32PORT)
182 if(ASPELL_SHARED_LIB)
183 add_definitions(-DASPELL_MAKE_LIB -DASPELL_USE_SHARED)
184 endif(ASPELL_SHARED_LIB)
186 add_library(${ASPELL_LIB_NAME} ${ASPELL_LINK} ${libaspell_sources} ${commons_headers})
190 target_link_libraries(${ASPELL_LIB_NAME} ole32)
194 ########################################################################
199 add_subdirectory(prog)
202 ########################################################################
207 set(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}/../gnuwin32)
209 install(TARGETS ${ASPELL_LIB_NAME}
210 RUNTIME DESTINATION bin
211 LIBRARY DESTINATION lib
212 ARCHIVE DESTINATION lib)
214 install(FILES ../interfaces/cc/aspell.h
217 if(ASPELL_SHARED_LIB)
218 install(FILES ../win32/aspellexport.h
220 endif(ASPELL_SHARED_LIB)