21ead4
diff -NaurpBb clucene-core-2.3.3.4/CMakeLists.txt clucene-core-2.3.3.4-mod/CMakeLists.txt
21ead4
--- clucene-core-2.3.3.4/CMakeLists.txt	2011-03-17 03:21:07.000000000 +0300
21ead4
+++ clucene-core-2.3.3.4-mod/CMakeLists.txt	2011-08-16 16:56:55.968268152 +0400
21ead4
@@ -163,7 +163,7 @@ IF ( BUILD_CONTRIBS )
21ead4
   SET(BUILD_CONTRIBS_LIB 1)
21ead4
 ENDIF ( BUILD_CONTRIBS )
21ead4
 IF ( BUILD_CONTRIBS_LIB )
21ead4
-  ADD_SUBDIRECTORY (src/contribs-lib EXCLUDE_FROM_ALL)
21ead4
+  ADD_SUBDIRECTORY (src/contribs-lib)
21ead4
 ENDIF ( BUILD_CONTRIBS_LIB )
21ead4
 
21ead4
 
21ead4
diff -NaurpBb clucene-core-2.3.3.4/src/contribs-lib/CMakeLists.txt clucene-core-2.3.3.4-mod/src/contribs-lib/CMakeLists.txt
21ead4
--- clucene-core-2.3.3.4/src/contribs-lib/CMakeLists.txt	2011-03-17 03:21:07.000000000 +0300
21ead4
+++ clucene-core-2.3.3.4-mod/src/contribs-lib/CMakeLists.txt	2011-08-16 17:14:13.499275499 +0400
21ead4
@@ -106,9 +106,26 @@ add_library(clucene-contribs-lib SHARED
21ead4
 )
21ead4
 TARGET_LINK_LIBRARIES(clucene-contribs-lib ${clucene_contrib_extra_libs})
21ead4
 
21ead4
+#install public headers.
21ead4
+FOREACH(file ${HEADERS})
21ead4
+	get_filename_component(apath ${file} PATH)
21ead4
+	get_filename_component(aname ${file} NAME)
21ead4
+	file(RELATIVE_PATH relpath ${CMAKE_SOURCE_DIR}/src/contribs-lib ${apath})
21ead4
+	IF ( NOT aname MATCHES "^_.*" )
21ead4
+		install(FILES ${file} 
21ead4
+		        DESTINATION include/${relpath}
21ead4
+		        COMPONENT development)
21ead4
+	ENDIF ( NOT aname MATCHES "^_.*" )
21ead4
+ENDFOREACH(file)
21ead4
+
21ead4
 #set properties on the libraries
21ead4
 SET_TARGET_PROPERTIES(clucene-contribs-lib PROPERTIES
21ead4
     VERSION ${CLUCENE_VERSION}
21ead4
     SOVERSION ${CLUCENE_SOVERSION}
21ead4
     COMPILE_DEFINITIONS_DEBUG _DEBUG
21ead4
 )
21ead4
+
21ead4
+#and install library
21ead4
+install(TARGETS clucene-contribs-lib 
21ead4
+        DESTINATION ${LIB_DESTINATION}  
21ead4
+        COMPONENT runtime )