Skip to content

Commit

Permalink
build CHANGE cmake version requirement back to 2.6
Browse files Browse the repository at this point in the history
String FIND was replaced by 2.6 constructs with
similar functionality.

Fixes #18
  • Loading branch information
michalvasko committed Feb 9, 2016
1 parent 029c083 commit 4cc2dde
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.5)
cmake_minimum_required(VERSION 2.6)
project(libyang C)

set(LIBYANG_DESCRIPTION "libyang is YANG data modelling language parser and toolkit written (and providing API) in C.")
Expand Down Expand Up @@ -106,8 +106,9 @@ if(PKG_CONFIG_FOUND)
# check that pkg-config includes the used path
execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable pc_path pkg-config RESULT_VARIABLE RETURN OUTPUT_VARIABLE PC_PATH ERROR_QUIET)
if(RETURN EQUAL 0)
string(FIND ${PC_PATH} "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig" PC_PATH_IDX)
if(PC_PATH_IDX EQUAL -1)
string(REGEX MATCH "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig" SUBSTR ${PC_PATH})
string(LENGTH ${SUBSTR} SUBSTR_LEN)
if(SUBSTR_LEN EQUAL 0)
message(WARNING "pkg-config will not detect the new package after installation, adjust PKG_CONFIG_PATH using \"export PKG_CONFIG_PATH=\${PKG_CONFIG_PATH}:${CMAKE_INSTALL_PREFIX}/lib/pkgconfig\".")
endif()
endif()
Expand Down

0 comments on commit 4cc2dde

Please sign in to comment.