cmake: detect argp.h on osx
Этот коммит содержится в:
родитель
4d43fbfb50
Коммит
5027627344
@ -74,6 +74,10 @@ if (WITH_NACL)
|
|||||||
endif (NOT NACL_FOUND)
|
endif (NOT NACL_FOUND)
|
||||||
endif (WITH_NACL)
|
endif (WITH_NACL)
|
||||||
|
|
||||||
|
if (BSD OR SOLARIS OR OSX)
|
||||||
|
find_package(Argp)
|
||||||
|
endif (BSD OR SOLARIS OR OSX)
|
||||||
|
|
||||||
# config.h checks
|
# config.h checks
|
||||||
include(ConfigureChecks.cmake)
|
include(ConfigureChecks.cmake)
|
||||||
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||||
|
@ -47,7 +47,11 @@ int main(void){ return 0; }
|
|||||||
endif(CMAKE_COMPILER_IS_GNUCC AND NOT MINGW AND NOT OS2)
|
endif(CMAKE_COMPILER_IS_GNUCC AND NOT MINGW AND NOT OS2)
|
||||||
|
|
||||||
# HEADER FILES
|
# HEADER FILES
|
||||||
|
set(CMAKE_REQUIRED_INCLUDES_SAVE ${CMAKE_REQUIRED_INCLUDES})
|
||||||
|
set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${ARGP_INCLUDE_DIRS})
|
||||||
check_include_file(argp.h HAVE_ARGP_H)
|
check_include_file(argp.h HAVE_ARGP_H)
|
||||||
|
set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_SAVE})
|
||||||
|
|
||||||
check_include_file(pty.h HAVE_PTY_H)
|
check_include_file(pty.h HAVE_PTY_H)
|
||||||
check_include_file(utmp.h HAVE_UTMP_H)
|
check_include_file(utmp.h HAVE_UTMP_H)
|
||||||
check_include_file(termios.h HAVE_TERMIOS_H)
|
check_include_file(termios.h HAVE_TERMIOS_H)
|
||||||
|
@ -8,13 +8,10 @@ set(examples_SRCS
|
|||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
${LIBSSH_PUBLIC_INCLUDE_DIRS}
|
${LIBSSH_PUBLIC_INCLUDE_DIRS}
|
||||||
|
${ARGP_INCLUDE_DIRS}
|
||||||
${CMAKE_BINARY_DIR}
|
${CMAKE_BINARY_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
if (BSD OR SOLARIS OR OSX)
|
|
||||||
find_package(Argp)
|
|
||||||
endif (BSD OR SOLARIS OR OSX)
|
|
||||||
|
|
||||||
if (UNIX AND NOT WIN32)
|
if (UNIX AND NOT WIN32)
|
||||||
add_executable(libssh_scp libssh_scp.c ${examples_SRCS})
|
add_executable(libssh_scp libssh_scp.c ${examples_SRCS})
|
||||||
target_link_libraries(libssh_scp ${LIBSSH_SHARED_LIBRARY})
|
target_link_libraries(libssh_scp ${LIBSSH_SHARED_LIBRARY})
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user