This commit is contained in:
@ -32,6 +32,9 @@ configure_file(
|
||||
# Set CMAKE_MODULE_PATH to include our custom find modules
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
||||
|
||||
# Find required libraries
|
||||
find_package(LibSSH REQUIRED)
|
||||
|
||||
# Auto-detect source files
|
||||
file(GLOB_RECURSE SOURCES "src/*.cpp")
|
||||
file(GLOB_RECURSE HEADERS "src/*.hpp")
|
||||
@ -45,6 +48,7 @@ target_include_directories(dropshell PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/utils
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/contrib
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/src>
|
||||
${LIBSSH_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
include(FetchContent)
|
||||
@ -54,7 +58,7 @@ FetchContent_Declare(
|
||||
GIT_TAG v2.1.5 # <HASH or TAG>
|
||||
)
|
||||
FetchContent_MakeAvailable(libassert)
|
||||
target_link_libraries(dropshell libassert::assert)
|
||||
target_link_libraries(dropshell PRIVATE libassert::assert)
|
||||
|
||||
# On windows copy libassert.dll to the same directory as the executable for your_target
|
||||
if(WIN32)
|
||||
@ -68,6 +72,7 @@ endif()
|
||||
|
||||
# Link libraries
|
||||
target_link_libraries(dropshell PRIVATE
|
||||
${LIBSSH_LIBRARIES}
|
||||
)
|
||||
|
||||
# Install targets
|
||||
|
Reference in New Issue
Block a user