Skip to content

Commit

Permalink
libdxfrw.pc.in: fix expansion and include path
Browse files Browse the repository at this point in the history
The include dirs are processed by cmake's configure_file since commit
3431cc6 (Fix building of pkgconfig on Windows). That means every
dollar referenced variables are expanded. But ${libdir} and
${includedir} are meant as pkgconfig variables, so should not be
expanded. Fix this by @only option of configure_file (and change all
${X} references to @x@).

And since commit 70ff2fe (Install DXFRW::dxfrw target), include
files have no version number in the path.  They reside in
/usr/include/libdxfrw/*. Fix this too by removing the version suffix.
  • Loading branch information
Jiri Slaby committed May 4, 2021
1 parent 16642a7 commit 2627bbf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -94,7 +94,7 @@ add_subdirectory(dwg2dxf)
# INSTALLATION
set(INSTALL_CONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/libdxfrw)

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libdxfrw.pc.in libdxfrw.pc)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libdxfrw.pc.in libdxfrw.pc @ONLY)

install(TARGETS dxfrw
EXPORT libdxfrw-targets
Expand Down
12 changes: 6 additions & 6 deletions libdxfrw.pc.in
@@ -1,10 +1,10 @@
prefix=${CMAKE_INSTALL_PREFIX}
exec_prefix=${CMAKE_INSTALL_PREFIX}
libdir=|${CMAKE_INSTALL_FULL_LIBDIR}
includedir=${CMAKE_INSTALL_FULL_INCLUDEDIR}
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
libdir=|@CMAKE_INSTALL_FULL_LIBDIR@
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@

Name: libdxfrw
Description: c++ library to read/write dxf files in binary and ascii form
Version: ${PROJECT_VERSION}
Version: @PROJECT_VERSION@
Libs: -L${libdir} -ldxfrw
Cflags: -I${includedir}/libdxfrw${PROJECT_VERSION_MAJOR}
Cflags: -I${includedir}/libdxfrw

0 comments on commit 2627bbf

Please sign in to comment.