Skip to content

Commit

Permalink
Add library path to pkg-config file.
Browse files Browse the repository at this point in the history
  • Loading branch information
0-wiz-0 committed Jan 6, 2024
1 parent 9ebe7bc commit 99cdae1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ endif()

set(PKG_CONFIG_INCLUDEDIR "\${prefix}/include")
set(PKG_CONFIG_LIBDIR "\${prefix}/lib")
set(PKG_CONFIG_LIBS "-lopenjph")
set(PKG_CONFIG_LIBS "-L\${prefix}/lib -lopenjph")

This comment has been minimized.

Copy link
@kmilos

kmilos Jan 8, 2024

Please change this to -L\${libdir}: https://people.freedesktop.org/~dbn/pkg-config-guide.html

This comment has been minimized.

Copy link
@aous72

aous72 Jan 8, 2024

Owner

Sure. I do not understand these well.
Would also adding
set(PKG_CONFIG_CFLAGS "-I\${includedir}")
Improve things?

This comment has been minimized.

Copy link
@kmilos

kmilos Jan 8, 2024

Yes, indeed.

In fact, you should probably have these fixed in your .pc.cmake template anyway and just don't bother with them here, like:

Libs: -L${libdir} @PKG_CONFIG_LIBS@
Cflags: -I${includedir} @PKG_CONFIG_CFLAGS@

I (and others?) prefer the @FOO@ in templates for substitution rather than $FOO variables


include(GNUInstallDirs)
install(TARGETS openjph
Expand Down

0 comments on commit 99cdae1

Please sign in to comment.