Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

external: update miniupnpc 2.2.8 #9367

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
cmake: add different parameters to add_monero_library.
1. LINKS flag, will link publicly the libraries provided.
2. PRIVATE_LINKS flag, will link privately the libraries provided.
3. INCLUDES flag, will includes publicly the dirs provided.
4. PRIVATE_INCLUDES flag, will include privately the libraries provided.
  • Loading branch information
0xFFFC0000 committed Jun 13, 2024
commit b91ead90254ac6d6daf908f689c38e372a44c615
18 changes: 17 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -643,7 +643,7 @@ function (monero_add_library name)
endfunction()

function (monero_add_library_with_deps)
cmake_parse_arguments(MONERO_ADD_LIBRARY "" "NAME" "DEPENDS;SOURCES" ${ARGN})
cmake_parse_arguments(MONERO_ADD_LIBRARY "" "NAME" "DEPENDS;LINKS;PRIVATE_LINKS;INCLUDES;PRIVATE_INCLUDES;SOURCES" ${ARGN})
source_group("${MONERO_ADD_LIBRARY_NAME}" FILES ${MONERO_ADD_LIBRARY_SOURCES})

# Define a ("virtual") object library and an actual library that links those
@@ -658,6 +658,22 @@ function (monero_add_library_with_deps)
if (MONERO_ADD_LIBRARY_DEPENDS)
add_dependencies(${objlib} ${MONERO_ADD_LIBRARY_DEPENDS})
endif()
if (MONERO_ADD_LIBRARY_LINKS)
target_link_libraries(${objlib} PUBLIC ${MONERO_ADD_LIBRARY_LINKS})
target_link_libraries(${MONERO_ADD_LIBRARY_NAME} PUBLIC ${MONERO_ADD_LIBRARY_LINKS})
endif()
if (MONERO_ADD_LIBRARY_PRIVATE_LINKS)
target_link_libraries(${objlib} PRIVATE ${MONERO_ADD_LIBRARY_PRIVATE_LINKS})
target_link_libraries(${MONERO_ADD_LIBRARY_NAME} PRIVATE ${MONERO_ADD_LIBRARY_PRIVATE_LINKS})
endif()
if (MONERO_ADD_LIBRARY_INCLUDES)
target_include_directories(${objlib} PUBLIC ${MONERO_ADD_LIBRARY_INCLUDES})
target_include_directories(${MONERO_ADD_LIBRARY_NAME} PUBLIC ${MONERO_ADD_LIBRARY_INCLUDES})
endif()
if (MONERO_ADD_LIBRARY_PRIVATE_INCLUDES)
target_include_directories(${objlib} PRIVATE ${MONERO_ADD_LIBRARY_PRIVATE_INCLUDES})
target_include_directories(${MONERO_ADD_LIBRARY_NAME} PRIVATE ${MONERO_ADD_LIBRARY_PRIVATE_INCLUDES})
endif()
set_property(TARGET "${MONERO_ADD_LIBRARY_NAME}" PROPERTY FOLDER "libs")
target_compile_definitions(${objlib}
PRIVATE $<TARGET_PROPERTY:${MONERO_ADD_LIBRARY_NAME},INTERFACE_COMPILE_DEFINITIONS>)