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

Fix demo compile issues due to CMake issues finding threading library #1399

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions cmake/nng-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

@PACKAGE_INIT@

set(NNG_VERSION_MAJOR "@NNG_VERSION_MAJOR@")
set(NNG_VERSION_MINOR "@NNG_VERSION_MINOR@")
set(NNG_VERSION_PATCH "@NNG_VERSION_PATCH@")
set(NNG_VERSION_MAJOR "@NNG_MAJOR_VERSION@")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These haven't been populating properly for quite some time. I'm not sure if it's useful having these properties or not.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOl. :-)

set(NNG_VERSION_MINOR "@NNG_MINOR_VERSION@")
set(NNG_VERSION_PATCH "@NNG_PATCH_VERSION@")

set_and_check(NNG_INCLUDE_DIRS "@PACKAGE_INCLUDE_INSTALL_DIRS@")

Expand Down
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ write_basic_package_version_file("${version_config}"
VERSION ${NNG_PACKAGE_VERSION}
COMPATIBILITY SameMajorVersion
)
get_property(NNG_PKGS GLOBAL PROPERTY NNG_PKGS)
configure_package_config_file(${PROJECT_SOURCE_DIR}/cmake/${PROJECT_NAME}-config.cmake.in "${project_config}"
INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
PATH_VARS INCLUDE_INSTALL_DIRS)
Expand Down
3 changes: 2 additions & 1 deletion src/platform/posix/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ if (NNG_PLATFORM_POSIX)

find_package(Threads REQUIRED)
nng_link_libraries(Threads::Threads)
set_property(GLOBAL APPEND PROPERTY NNG_PKGS Threads)

# Unconditionally declare the following feature test macros. These are
# needed for some platforms (glibc and SunOS/illumos) and are harmless
Expand Down Expand Up @@ -105,4 +106,4 @@ if (NNG_PLATFORM_POSIX)
else ()
nng_sources(posix_rand_urandom.c)
endif ()
endif ()
endif ()
1 change: 1 addition & 0 deletions src/sp/transport/zerotier/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ if (NNG_TRANSPORT_ZEROTIER)
************************************************************")

find_package(zerotiercore REQUIRED)
set_property(GLOBAL APPEND PROPERTY NNG_PKGS zerotiercore)

nng_link_libraries(zerotiercore::zerotiercore)
nng_defines(NNG_TRANSPORT_ZEROTIER)
Expand Down