Skip to content

Packaging #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 13, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 22 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,24 @@ OPTION(ENABLE_CYCLIC_CHECK
SET(LIB_DESTINATION "lib" CACHE STRING "Define lib output directory name")

IF ( ENABLE_NEDMALLOC )
ADD_DEFINITIONS(-DLPP_USE_NEDMALLOC)
SET(DEFINE_USE_NEDMALLOC "define")
ELSE ( ENABLE_NEDMALLOC )
SET(DEFINE_USE_NEDMALLOC "undef")
ENDIF ( ENABLE_NEDMALLOC )

IF ( ENABLE_STANDARD_ALLOCATOR )
SET(DEFINE_USE_ALLOCATOR "undef")
ELSE ( ENABLE_STANDARD_ALLOCATOR )
SET(DEFINE_USE_ALLOCATOR "define")
ENDIF ( ENABLE_STANDARD_ALLOCATOR )

IF ( ENABLE_CYCLIC_CHECK )
ADD_DEFINITIONS(-DLPP_USE_CYCLIC_CHECK)
SET(DEFINE_USE_CYCLIC_CHECK "define")
ELSE ( ENABLE_CYCLIC_CHECK )
SET(DEFINE_USE_CYCLIC_CHECK "undef")
ENDIF ( ENABLE_CYCLIC_CHECK )
####################################


####################################
# PLATFORM specific options
####################################
Expand Down Expand Up @@ -149,6 +159,15 @@ INCLUDE(PCHSupport)
#todo: make this optional and make it possible to add more headers - like boost threads


#################################
# generate Config.h
#################################

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/Config.h.cmake
${CMAKE_CURRENT_BINARY_DIR}/include/Config.h @ONLY)

INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/include)

####################################
# The subdirs
####################################
Expand All @@ -158,7 +177,6 @@ ADD_SUBDIRECTORY (src/contrib)
ADD_SUBDIRECTORY (src/demo EXCLUDE_FROM_ALL)
ADD_SUBDIRECTORY (src/test)


#################################
# install pkg-config file
#################################
Expand All @@ -174,7 +192,6 @@ IF(NOT WIN32)
DESTINATION ${LIB_DESTINATION}/pkgconfig )
ENDIF(NOT WIN32)


####################################
# Custom targets
####################################
Expand Down
6 changes: 3 additions & 3 deletions include/Config.h → include/Config.h.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@
#endif

// Define to enable cyclic checking in debug builds
// #define LPP_USE_CYCLIC_CHECK
#@DEFINE_USE_CYCLIC_CHECK@ LPP_USE_CYCLIC_CHECK

// Define to use custom allocator (useful in Windows builds and when using nedmalloc)
#define LPP_USE_ALLOCATOR
#@DEFINE_USE_ALLOCATOR@ LPP_USE_ALLOCATOR

// Define to use nedmalloc memory allocator
// #define LPP_USE_NEDMALLOC
#@DEFINE_USE_NEDMALLOC@ LPP_USE_NEDMALLOC

#ifdef LPP_USE_NEDMALLOC
#define EXTSPEC LPPAPI
Expand Down
4 changes: 2 additions & 2 deletions liblucene++-contrib.pc.cmake
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}/bin
libdir=${prefix}/@LIB_DESTINATION@
libdir=@LIB_DESTINATION@
includedir=${prefix}/include/lucene++
lib=lucene++-contrib

Name: liblucene++-contrib
Description: Contributions for Lucene++ - a C++ search engine, ported from the popular Apache Lucene
Version: @LUCENE++_VERSION@
Libs: -L${prefix}/@LIB_DESTINATION@/ -l${lib}
Libs: -L@LIB_DESTINATION@/ -l${lib}
Cflags: -I${includedir}
Requires: liblucene++=@LUCENE++_VERSION@
~
Expand Down
4 changes: 2 additions & 2 deletions liblucene++.pc.cmake
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}/bin
libdir=${prefix}/@LIB_DESTINATION@
libdir=@LIB_DESTINATION@
includedir=${prefix}/include/lucene++
lib=lucene++

Name: liblucene++
Description: Lucene++ - a C++ search engine, ported from the popular Apache Lucene
Version: @LUCENE++_VERSION@
Libs: -L${prefix}/@LIB_DESTINATION@/ -l${lib}
Libs: -L@LIB_DESTINATION@ -l${lib}
Cflags: -I${includedir}
~

3 changes: 2 additions & 1 deletion src/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ file(GLOB_RECURSE lucene_sources
${lucene++-lib_SOURCE_DIR}/util/*.cpp)

file(GLOB_RECURSE INTERN_HEADERS ${lucene++-libs_SOURCE_DIR}/include/*.h)
file(GLOB_RECURSE HEADERS ${lucene++-base_SOURCE_DIR}/include/*.h)
file(GLOB_RECURSE HEADERS ${lucene++-base_SOURCE_DIR}/include/*.h
${lucene++-base_BINARY_DIR}/include/*.h)

#C sources...
file(GLOB_RECURSE lucene_c_sources
Expand Down