Skip to content

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

Merged
merged 1 commit into from
Nov 13, 2023
Merged

Use pkg-config for jsoncpp if possible #1938

merged 1 commit into from
Nov 13, 2023

Conversation

juan-lunarg
Copy link
Contributor

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-tester-lunarg
Copy link

CI VulkanTools build queued with queue ID 82523.

@ci-tester-lunarg
Copy link

CI VulkanTools build # 2826 running.

else()
find_package(jsoncpp CONFIG)
target_link_libraries(vkvia PRIVATE jsoncpp_static)
Copy link
Contributor Author

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.

Comment on lines +84 to +87
"-DJSONCPP_WITH_PKGCONFIG_SUPPORT=ON",
"-DBUILD_SHARED_LIBS=OFF",
"-DBUILD_STATIC_LIBS=ON",
"-DBUILD_OBJECT_LIBS=OFF"
Copy link
Contributor Author

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-tester-lunarg
Copy link

CI VulkanTools build # 2826 failed.

@ci-tester-lunarg
Copy link

CI VulkanTools build queued with queue ID 82532.

@ci-tester-lunarg
Copy link

CI VulkanTools build # 2827 running.

@ci-tester-lunarg
Copy link

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-tester-lunarg
Copy link

CI VulkanTools build queued with queue ID 82539.

Copy link
Contributor

@charles-lunarg charles-lunarg left a 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-tester-lunarg
Copy link

CI VulkanTools build # 2828 running.

@ci-tester-lunarg
Copy link

CI VulkanTools build # 2828 passed.

Comment on lines +75 to +76
find_package(jsoncpp CONFIG REQUIRED)
target_link_libraries(vkvia PRIVATE jsoncpp_static)
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants