Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ cmake_minimum_required(VERSION 3.20.2 FATAL_ERROR)
cmake_policy(SET CMP0077 NEW)

set(PACKAGE_NAME "openzl")
set(PACKAGE_DESCRIPTION "A novel data compression framework")
project(${PACKAGE_NAME} CXX C ASM)

# ---- Build Options ----
Expand Down Expand Up @@ -310,7 +311,23 @@ if (OPENZL_INSTALL)
COMPONENT dev
)

# TODO: Generate a pkg-config file
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/openzl.pc.in"
"${CMAKE_CURRENT_BINARY_DIR}/openzl.pc"
@ONLY
)

configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/openzl-cpp.pc.in"
"${CMAKE_CURRENT_BINARY_DIR}/openzl-cpp.pc"
@ONLY
)

install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/openzl.pc" "${CMAKE_CURRENT_BINARY_DIR}/openzl-cpp.pc"
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
)

endif()

# ---- Trailing User Messages ----
Expand Down
14 changes: 14 additions & 0 deletions scripts/openzl-cpp.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@

name: @PACKAGE_NAME@-cpp
description: @PACKAGE_DESCRIPTION@
version: @PACKAGE_VERSION@
license: BSD-3-Clause
url: https://openzl.org
source: http://github.com/facebook/openzl/archive/v@PACKAGE_VERSION@/openzl-@PACKAGE_VERSION@.tar.gz
requires: libzstd openzl
libs: -L${libdir} -lopenzl_cpp
cflags: -I${includedir}
14 changes: 14 additions & 0 deletions scripts/openzl.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@

name: @PACKAGE_NAME@
description: @PACKAGE_DESCRIPTION@
version: @PACKAGE_VERSION@
license: BSD-3-Clause
url: https://openzl.org
source: http://github.com/facebook/openzl/archive/v@PACKAGE_VERSION@/openzl-@PACKAGE_VERSION@.tar.gz
requires: libzstd
libs: -L${libdir} -lopenzl
cflags: -I${includedir}