mirror of
https://github.com/Dushistov/sdcv.git
synced 2025-12-13 08:41:55 +00:00
fix: use READLINE_(INCLUDE_DIR|LIBRARY) if WITH_READLINE==True
This commit is contained in:
committed by
Evgeniy Dushistov
parent
24c08365c4
commit
c57ef6e916
@@ -27,6 +27,7 @@ if (WITH_READLINE)
|
|||||||
find_path(READLINE_INCLUDE_DIR readline/readline.h)
|
find_path(READLINE_INCLUDE_DIR readline/readline.h)
|
||||||
find_library(READLINE_LIBRARY NAMES readline)
|
find_library(READLINE_LIBRARY NAMES readline)
|
||||||
if (NOT (READLINE_INCLUDE_DIR AND READLINE_LIBRARY))
|
if (NOT (READLINE_INCLUDE_DIR AND READLINE_LIBRARY))
|
||||||
|
message(STATUS "readline library not FOUND, disable it's usage")
|
||||||
set(WITH_READLINE False CACHE BOOL "Use readline library" FORCE)
|
set(WITH_READLINE False CACHE BOOL "Use readline library" FORCE)
|
||||||
endif ()
|
endif ()
|
||||||
endif (WITH_READLINE)
|
endif (WITH_READLINE)
|
||||||
@@ -82,10 +83,13 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake
|
|||||||
include_directories(
|
include_directories(
|
||||||
${ZLIB_INCLUDE_DIR}
|
${ZLIB_INCLUDE_DIR}
|
||||||
${GLIB2_INCLUDE_DIRS}
|
${GLIB2_INCLUDE_DIRS}
|
||||||
${READLINE_INCLUDE_DIR}
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/lib
|
${CMAKE_CURRENT_SOURCE_DIR}/src/lib
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (WITH_READLINE)
|
||||||
|
include_directories(${READLINE_INCLUDE_DIR})
|
||||||
|
endif()
|
||||||
|
|
||||||
#
|
#
|
||||||
# Packing stuff
|
# Packing stuff
|
||||||
@@ -107,8 +111,10 @@ add_executable(sdcv ${sdcv_SRCS})
|
|||||||
target_link_libraries(sdcv
|
target_link_libraries(sdcv
|
||||||
${GLIB2_LIBRARIES}
|
${GLIB2_LIBRARIES}
|
||||||
${ZLIB_LIBRARIES}
|
${ZLIB_LIBRARIES}
|
||||||
${READLINE_LIBRARY}
|
|
||||||
)
|
)
|
||||||
|
if (WITH_READLINE)
|
||||||
|
target_link_libraries(sdcv ${READLINE_LIBRARY})
|
||||||
|
endif()
|
||||||
if (ENABLE_NLS)
|
if (ENABLE_NLS)
|
||||||
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "locale")
|
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "locale")
|
||||||
endif ()
|
endif ()
|
||||||
|
|||||||
Reference in New Issue
Block a user