Skip to content

Commit

Permalink
add pkg-config file for go-elektra and copy on cmake (ElektraInitiati…
Browse files Browse the repository at this point in the history
  • Loading branch information
tmakar committed May 11, 2023
1 parent 1cabd59 commit be11a0a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/bindings/go-elektra/CMakeLists.txt
Expand Up @@ -3,6 +3,9 @@ find_program (GO_EXECUTABLE go)
if (GO_EXECUTABLE)
add_binding (go-elektra)

# create temporary elektra.pc file
configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/temp.elektra.pc" "${CMAKE_CURRENT_BINARY_DIR}/elektra.pc" @ONLY)

# build
add_custom_command (
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/lib/libelektra.golib"
Expand Down
2 changes: 1 addition & 1 deletion src/bindings/go-elektra/kdb/kdb.go
@@ -1,6 +1,6 @@
package kdb

// #cgo pkg-config: elektra
// #cgo pkg-config: go-elektra
// #include <kdb.h>
import "C"

Expand Down
10 changes: 10 additions & 0 deletions src/bindings/go-elektra/temp.elektra.pc
@@ -0,0 +1,10 @@
prefix="@CMAKE_BINARY_DIR@"
libdir=${prefix}/lib
srcinclude=${prefix}/src/include
buildinclude="@CMAKE_SOURCE_DIR@"/src/include

Name: @PACKAGE_NAME@
Description: @PACKAGE_DESCRIPTION@
Version: @KDB_VERSION@
Cflags: -I${srcinclude} -I${buildinclude}
Libs: -L${libdir} -lelektra

0 comments on commit be11a0a

Please sign in to comment.