summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2019-01-06 00:44:26 +0100
committerSlávek Banko <[email protected]>2019-01-06 00:44:26 +0100
commit1b466c3d2b4cab6d4f038b11039625a378197931 (patch)
treeea9cf7caad3805daf776990e4bf55d30e207b9d9
parent5bdf9fc4a4eb101e8c256bdc4db800d3fa3a572f (diff)
downloadkcmldap-1b466c3d2b4cab6d4f038b11039625a378197931.tar.gz
kcmldap-1b466c3d2b4cab6d4f038b11039625a378197931.zip
Fix krb5 detection without pkgconfig file.
Signed-off-by: Slávek Banko <[email protected]>
-rw-r--r--ConfigureChecks.cmake21
1 files changed, 20 insertions, 1 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index b4ba4da..069df06 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -43,5 +43,24 @@ endif( )
pkg_search_module( KRB5 krb5 )
if( NOT KRB5_FOUND)
- tde_message_fatal( "krb5 library is required but not found on your system" )
+ if( NOT DEFINED KRB5_CONFIG_EXECUTABLE )
+ find_program( KRB5_CONFIG_EXECUTABLE NAMES krb5-config )
+ if( NOT KRB5_CONFIG_EXECUTABLE )
+ tde_message_fatal( "krb5 library is required but not found on your system" )
+ endif( )
+ endif( )
+
+ execute_process(
+ COMMAND ${KRB5_CONFIG_EXECUTABLE} --libs
+ OUTPUT_VARIABLE KRB5_LIBRARIES
+ ERROR_VARIABLE KRB5_LIBRARIES
+ )
+ execute_process(
+ COMMAND ${KRB5_CONFIG_EXECUTABLE} --cflags
+ OUTPUT_VARIABLE KRB5_INCLUDE_DIRS
+ ERROR_VARIABLE KRB5_INCLUDE_DIRS
+ )
+ if( NOT "${KRB5_LIBRARIES}" STREQUAL "" )
+ set( KRB5_FOUND 1 )
+ endif( )
endif( )