Fixed CMake configuration error with -DEMBEDDED_LIB=<path to folder> causing the library not being found.

This commit is contained in:
Markus Makela 2014-10-14 19:44:41 +03:00
parent 25bef90508
commit 6de751cd83

View File

@ -127,13 +127,17 @@ debugmsg("Search returned: ${MYSQL_DIR_LOC}")
# Find the embedded mysql library
if (DEFINED EMBEDDED_LIB)
debugmsg("Searching for the embedded library at: ${EMBEDDED_LIB}")
if(${CMAKE_VERSION} VERSION_LESS 2.12 )
set(COMP_VAR PATH)
else()
set(COMP_VAR DIRECTORY)
if( NOT (IS_DIRECTORY ${EMBEDDED_LIB}) )
debugmsg("EMBEDDED_LIB is not a directory: ${EMBEDDED_LIB}")
if(${CMAKE_VERSION} VERSION_LESS 2.12 )
set(COMP_VAR PATH)
else()
set(COMP_VAR DIRECTORY)
endif()
get_filename_component(EMBEDDED_LIB ${EMBEDDED_LIB} ${COMP_VAR})
debugmsg("EMBEDDED_LIB directory component: ${EMBEDDED_LIB}")
endif()
get_filename_component(EMBEDDED_LIB ${EMBEDDED_LIB} ${COMP_VAR})
debugmsg("Searching for the embedded library at: ${EMBEDDED_LIB}")
endif()
if(STATIC_EMBEDDED)