small recoll/kio_recoll build changes: avoid unnecessary recompilations and make them play nicer together
This commit is contained in:
@@ -32,9 +32,7 @@ you should READ THE HELP FILE.
|
||||
Building and installing:
|
||||
=======================
|
||||
|
||||
The directory mode is only available with KDE 4.1 and later. This
|
||||
began under KDE3 and might still be made to work, but I only built
|
||||
with KDE4 and cmake recently.
|
||||
Only tested with KDE 4.1 and later.
|
||||
|
||||
The main Recoll installation shares its prefix with the KIO slave,
|
||||
which needs to use the KDE one. This means that, if KDE lives in /usr,
|
||||
@@ -42,13 +40,19 @@ Recoll must be configured with --prefix=/usr, not /usr/local. Else
|
||||
you'll have run-time problems, the slave will not be able to find the
|
||||
Recoll configuration.
|
||||
|
||||
!!*Notice: You cannot share a build directory between recoll and kio_recoll
|
||||
because they use different configure options for the main lib, but build it
|
||||
in the same place. The main lib "configure" is run at "cmake" time for
|
||||
kio_recoll, the build is done at "make" time.
|
||||
|
||||
|
||||
Recipe:
|
||||
- Make sure the KDE4 core devel packages and cmake are installed.
|
||||
|
||||
- Extract the Recoll source.
|
||||
|
||||
- IF Recoll is not installed yet: configure recoll with
|
||||
--prefix=/usr --enable-pic (or wherever KDE lives), build and install
|
||||
--prefix=/usr (or wherever KDE lives), build and install
|
||||
Recoll.
|
||||
|
||||
- In the Recoll source, go to kde/kioslave/recoll, then build and
|
||||
|
||||
@@ -14,18 +14,13 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}")
|
||||
|
||||
set(rcltop ${CMAKE_CURRENT_SOURCE_DIR}/../../../)
|
||||
|
||||
# Execute minimum recoll configuration to create autoconfig.h and version.h
|
||||
# Execute recoll configuration to create autoconfig.h and version.h and
|
||||
# generate a PIC lib
|
||||
execute_process(COMMAND ${rcltop}/configure --disable-qtgui --disable-x11mon --enable-pic --prefix=${CMAKE_INSTALL_PREFIX} --mandir=${CMAKE_INSTALL_PREFIX}/share/man
|
||||
WORKING_DIRECTORY ${rcltop}
|
||||
)
|
||||
execute_process(COMMAND make common/rclversion.h
|
||||
WORKING_DIRECTORY ${rcltop}
|
||||
)
|
||||
execute_process(COMMAND make
|
||||
WORKING_DIRECTORY ${rcltop}/lib
|
||||
)
|
||||
|
||||
link_directories(${rcltop}/lib)
|
||||
link_directories(${rcltop}/lib ${CMAKE_INSTALL_PREFIX}/lib)
|
||||
|
||||
include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES}
|
||||
${rcltop}/aspell
|
||||
@@ -53,6 +48,12 @@ ENDIF(PTHREAD_IN_LIBPTHREAD)
|
||||
|
||||
kde4_add_plugin(kio_recoll ${kio_recoll_SRCS})
|
||||
|
||||
add_custom_target(rcllib
|
||||
COMMAND make
|
||||
WORKING_DIRECTORY ${rcltop}/lib
|
||||
)
|
||||
add_dependencies(kio_recoll rcllib)
|
||||
|
||||
target_link_libraries(kio_recoll rcl xapian z ${EXTRA_LIBS} ${KDE4_KIO_LIBS})
|
||||
|
||||
install(TARGETS kio_recoll DESTINATION ${PLUGIN_INSTALL_DIR})
|
||||
|
||||
Reference in New Issue
Block a user