-
Notifications
You must be signed in to change notification settings - Fork 184
Use pkg-config for jsoncpp if possible #1938
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
Conversation
CI VulkanTools build queued with queue ID 82523. |
CI VulkanTools build # 2826 running. |
via/CMakeLists.txt
Outdated
else() | ||
find_package(jsoncpp CONFIG) | ||
target_link_libraries(vkvia PRIVATE jsoncpp_static) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note this part is important for internal Windows build that doesn't have pkg-config. We currently don't use pkg-config at all for our Windows builds and adding it is low priority.
"-DJSONCPP_WITH_PKGCONFIG_SUPPORT=ON", | ||
"-DBUILD_SHARED_LIBS=OFF", | ||
"-DBUILD_STATIC_LIBS=ON", | ||
"-DBUILD_OBJECT_LIBS=OFF" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll update the SDK scripts otherwise we will have issues.
CI VulkanTools build # 2826 failed. |
CI VulkanTools build queued with queue ID 82532. |
CI VulkanTools build # 2827 running. |
CI VulkanTools build # 2827 failed. |
The main thing to note is we want to use the STATIC version of jsoncpp By default pkg-config was pointing to the SHARED version I explicitly turn this off in the known_good.json now so now the pkg-config path will work for us for the linux tarball.
CI VulkanTools build queued with queue ID 82539. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Static linking is the right choice here I believe.
CI VulkanTools build # 2828 running. |
CI VulkanTools build # 2828 passed. |
find_package(jsoncpp CONFIG REQUIRED) | ||
target_link_libraries(vkvia PRIVATE jsoncpp_static) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Internal Windows CI doesn't have package config. Furthermore most Windows developers don't tend to have this by default. So for now we support both paths. At least both paths are actively tested though which was the main issue before.
The main thing to note is we want to use the STATIC version of jsoncpp
By default pkg-config was pointing to the SHARED version
I explicitly turn this off in the known_good.json now so now the pkg-config path will work for us for the linux tarball.