Skip to content

Commit

Permalink
Merge pull request CESNET#10 from jktjkt/cmake
Browse files Browse the repository at this point in the history
BUILD Fix symbol detection on non-standard include paths
  • Loading branch information
michalvasko authored Jul 26, 2016
2 parents 7835ede + 3b43142 commit f055519
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeModules/FindLibNETCONF2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,11 @@ else (LIBNETCONF2_LIBRARIES AND LIBNETCONF2_INCLUDE_DIRS)

if (LIBNETCONF2_INCLUDE_DIR AND LIBNETCONF2_LIBRARY)
set(LIBNETCONF2_FOUND TRUE)
# check compile flags
# check the configured options and make them available through cmake
list(INSERT CMAKE_REQUIRED_INCLUDES 0 "${LIBNETCONF2_INCLUDE_DIR}")
check_symbol_exists("NC_ENABLED_SSH" "nc_client.h" LIBNETCONF2_ENABLED_SSH)
check_symbol_exists("NC_ENABLED_TLS" "nc_client.h" LIBNETCONF2_ENABLED_TLS)
list(REMOVE_AT CMAKE_REQUIRED_INCLUDES 0)
else (LIBNETCONF2_INCLUDE_DIR AND LIBNETCONF2_LIBRARY)
set(LIBNETCONF2_FOUND FALSE)
endif (LIBNETCONF2_INCLUDE_DIR AND LIBNETCONF2_LIBRARY)
Expand Down

0 comments on commit f055519

Please sign in to comment.