mirror of
https://github.com/libssh2/libssh2.git
synced 2025-07-29 13:01:14 +03:00
cmake: dedupe setting -DHAVE_CONFIG_H
Move `libssh2_config.h` generation and setting `-DHAVE_CONFIG_H` to the root `CMakeFile.txt`. Also move symbol hiding setup there. It needs to be done before generating the config file for `LIBSSH2_API` value to be set in it. After this change the `HIDE_SYMBOLS` setting is accepted without an annoying CMake warning when not actually building a shared libssh2 lib. Closes #981
This commit is contained in:
@ -37,8 +37,6 @@ include(CopyRuntimeDependencies)
|
||||
|
||||
list(APPEND LIBRARIES ${SOCKET_LIBRARIES})
|
||||
|
||||
add_definitions(-DHAVE_CONFIG_H)
|
||||
|
||||
transform_makefile_inc("Makefile.am" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.am.cmake")
|
||||
# Get 'noinst_PROGRAMS' variable
|
||||
include(${CMAKE_CURRENT_BINARY_DIR}/Makefile.am.cmake)
|
||||
|
Reference in New Issue
Block a user