diff -c -r clucene-core-2.3.3.4.orig/src/core/CMakeLists.txt clucene-core-2.3.3.4/src/core/CMakeLists.txt
*** clucene-core-2.3.3.4.orig/src/core/CMakeLists.txt	2011-03-16 21:21:07.000000000 -0300
--- clucene-core-2.3.3.4/src/core/CMakeLists.txt	2016-07-18 07:03:30.941376500 -0300
***************
*** 209,214 ****
--- 209,215 ----
  	)
  	
  	SET_TARGET_PROPERTIES(clucene-core-static PROPERTIES
+         OUTPUT_NAME clucene-core
  	    VERSION ${CLUCENE_VERSION}
  	    SOVERSION ${CLUCENE_SOVERSION}
  	    COMPILE_DEFINITIONS_DEBUG _DEBUG
***************
*** 252,265 ****
      set(CLUCENE_SOVERSION ${CLUCENE_SOVERSION})
  ")
  install(FILES "${CMAKE_CURRENT_BINARY_DIR}/CLuceneConfig.cmake"
!         DESTINATION ${LIB_DESTINATION}/CLuceneConfig.cmake)
  
  # install pkg-config file
! IF(NOT WIN32)
    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libclucene-core.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libclucene-core.pc @ONLY)
    install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libclucene-core.pc
            DESTINATION ${LIB_DESTINATION}/pkgconfig )
! ENDIF(NOT WIN32)
  
  
  #install non system-independent
--- 253,266 ----
      set(CLUCENE_SOVERSION ${CLUCENE_SOVERSION})
  ")
  install(FILES "${CMAKE_CURRENT_BINARY_DIR}/CLuceneConfig.cmake"
!         DESTINATION ${LIB_DESTINATION}/cmake/CLucene)
  
  # install pkg-config file
! IF(NOT WIN32 OR MINGW)
    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libclucene-core.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libclucene-core.pc @ONLY)
    install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libclucene-core.pc
            DESTINATION ${LIB_DESTINATION}/pkgconfig )
! ENDIF(NOT WIN32 OR MINGW)
  
  
  #install non system-independent
***************
*** 267,286 ****
      install(FILES ${clucene-shared_BINARY_DIR}/CLucene/clucene-config.h 
              DESTINATION ${LUCENE_SYS_INCLUDES}/CLucene  
              COMPONENT development)
-     install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CLuceneConfig.cmake 
-             DESTINATION ${LUCENE_SYS_INCLUDES}/CLucene  
-             COMPONENT development)
  ELSE ( LUCENE_SYS_INCLUDES )
      install(FILES ${clucene-shared_BINARY_DIR}/CLucene/clucene-config.h 
              DESTINATION include/CLucene
              COMPONENT development)
-     install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CLuceneConfig.cmake 
-             DESTINATION include/CLucene
-             COMPONENT development)
  ENDIF ( LUCENE_SYS_INCLUDES )
  
  
  #and install library
! install(TARGETS clucene-core 
!         DESTINATION ${LIB_DESTINATION}  
          COMPONENT runtime )
--- 268,283 ----
      install(FILES ${clucene-shared_BINARY_DIR}/CLucene/clucene-config.h 
              DESTINATION ${LUCENE_SYS_INCLUDES}/CLucene  
              COMPONENT development)
  ELSE ( LUCENE_SYS_INCLUDES )
      install(FILES ${clucene-shared_BINARY_DIR}/CLucene/clucene-config.h 
              DESTINATION include/CLucene
              COMPONENT development)
  ENDIF ( LUCENE_SYS_INCLUDES )
  
  
  #and install library
! install(TARGETS clucene-core
!         LIBRARY DESTINATION ${LIB_DESTINATION}
!         ARCHIVE DESTINATION ${LIB_DESTINATION}
!         RUNTIME DESTINATION bin
          COMPONENT runtime )
diff -c -r clucene-core-2.3.3.4.orig/src/shared/CMakeLists.txt clucene-core-2.3.3.4/src/shared/CMakeLists.txt
*** clucene-core-2.3.3.4.orig/src/shared/CMakeLists.txt	2011-03-16 21:21:07.000000000 -0300
--- clucene-core-2.3.3.4/src/shared/CMakeLists.txt	2016-07-18 07:03:30.957003100 -0300
***************
*** 147,153 ****
  CHOOSE_FUNCTION(_mkdir "_mkdir((const char*)0)" "#define _mkdir(x) mkdir(x,0777)")
  CHOOSE_FUNCTION(SLEEPFUNCTION "usleep;Sleep(0);_sleep")
  
! CHOOSE_FUNCTION(_snprintf "snprintf;_snprintf")
  CHOOSE_FUNCTION(_snwprintf "snwprintf;_snwprintf")
  
  ########################################################################
--- 147,153 ----
  CHOOSE_FUNCTION(_mkdir "_mkdir((const char*)0)" "#define _mkdir(x) mkdir(x,0777)")
  CHOOSE_FUNCTION(SLEEPFUNCTION "usleep;Sleep(0);_sleep")
  
! #CHOOSE_FUNCTION(_snprintf "snprintf;_snprintf")
  CHOOSE_FUNCTION(_snwprintf "snwprintf;_snwprintf")
  
  ########################################################################
***************
*** 211,219 ****
  ########################################################################
  
  #check for pthreads
! IF ( CMAKE_USE_WIN32_THREADS_INIT )
      SET ( _CL_HAVE_WIN32_THREADS 1 )
! ENDIF ( CMAKE_USE_WIN32_THREADS_INIT )
  IF ( CMAKE_USE_PTHREADS_INIT )
      SET ( _CL_HAVE_PTHREAD 1 )
  ENDIF (CMAKE_USE_PTHREADS_INIT)
--- 211,219 ----
  ########################################################################
  
  #check for pthreads
! IF ( CMAKE_USE_WIN32_THREADS_INIT AND NOT MINGW )
      SET ( _CL_HAVE_WIN32_THREADS 1 )
! ENDIF ( CMAKE_USE_WIN32_THREADS_INIT AND NOT MINGW )
  IF ( CMAKE_USE_PTHREADS_INIT )
      SET ( _CL_HAVE_PTHREAD 1 )
  ENDIF (CMAKE_USE_PTHREADS_INIT)
***************
*** 339,346 ****
    TARGET_LINK_LIBRARIES(clucene-shared ${EXTRA_LIBS})
  ENDIF ( EXTRA_LIBS )
  
! install(TARGETS clucene-shared 
!         DESTINATION ${LIB_DESTINATION} 
          COMPONENT development )
  
  IF ( BUILD_STATIC_LIBRARIES )
--- 339,348 ----
    TARGET_LINK_LIBRARIES(clucene-shared ${EXTRA_LIBS})
  ENDIF ( EXTRA_LIBS )
  
! install(TARGETS clucene-shared
!         LIBRARY DESTINATION ${LIB_DESTINATION}
!         ARCHIVE DESTINATION ${LIB_DESTINATION}
!         RUNTIME DESTINATION bin
          COMPONENT development )
  
  IF ( BUILD_STATIC_LIBRARIES )
***************
*** 349,354 ****
--- 351,357 ----
  	)
  	
  	SET_TARGET_PROPERTIES(clucene-shared-static PROPERTIES
+         OUTPUT_NAME clucene-shared
  	    VERSION ${CLUCENE_VERSION}
  	    SOVERSION ${CLUCENE_SOVERSION}
  	    COMPILE_DEFINITIONS_DEBUG _DEBUG
diff -c -r clucene-core-2.3.3.4.orig/src/test/search/TestIndexSearcher.cpp clucene-core-2.3.3.4/src/test/search/TestIndexSearcher.cpp
*** clucene-core-2.3.3.4.orig/src/test/search/TestIndexSearcher.cpp	2011-03-16 21:21:07.000000000 -0300
--- clucene-core-2.3.3.4/src/test/search/TestIndexSearcher.cpp	2016-07-18 07:03:30.957003100 -0300
***************
*** 5,10 ****
--- 5,11 ----
  * the GNU Lesser General Public License, as specified in the COPYING file.
  ------------------------------------------------------------------------------*/
  #include "test.h"
+ #include <unistd.h>
  
  DEFINE_MUTEX(searchMutex);
  DEFINE_CONDITION(searchCondition);
