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

[BUILD] flags from the png pkg-config ignored for vdb_tool #1967

Open
darix opened this issue Nov 14, 2024 · 0 comments
Open

[BUILD] flags from the png pkg-config ignored for vdb_tool #1967

darix opened this issue Nov 14, 2024 · 0 comments

Comments

@darix
Copy link

darix commented Nov 14, 2024

pkg-config --cflags /usr/lib64/pkgconfig/libpng16.pc
-I/usr/include/libpng16

a patch like this would fix it. Edit: patch updated as --libs from the pkg-config is also ignored.

Index: openvdb-12.0.0/openvdb_cmd/vdb_tool/CMakeLists.txt
===================================================================
--- openvdb-12.0.0.orig/openvdb_cmd/vdb_tool/CMakeLists.txt
+++ openvdb-12.0.0/openvdb_cmd/vdb_tool/CMakeLists.txt
@@ -80,10 +80,12 @@ if(OPENVDB_TOOL_USE_PNG)
   target_compile_definitions(vdb_tool_common INTERFACE "VDB_TOOL_USE_PNG")
   if(WIN32)
     find_package(libpng CONFIG REQUIRED)
+    target_link_libraries(vdb_tool_common INTERFACE png)
   else()
     find_package(PNG REQUIRED)
+    target_include_directories(vdb_tool_common INTERFACE ${PNG_INCLUDE_DIR})
+    target_link_libraries(vdb_tool_common INTERFACE ${PNG_LIBRARIES})
   endif()
-  target_link_libraries(vdb_tool_common INTERFACE png)
 endif()
 
 if(OPENVDB_TOOL_USE_PDAL)
@darix darix changed the title [BUILD] cflags from the png pkg-config ignored for vdb_tool [BUILD] flags from the png pkg-config ignored for vdb_tool Nov 14, 2024
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

No branches or pull requests

1 participant