File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,21 @@ target_compile_definitions(opusfile
83
83
$< $< BOOL:${OP_ENABLE_ASSERTIONS} > :OP_ENABLE_ASSERTIONS>
84
84
$< $< BOOL:${OP_HAVE_LRINTF} > :OP_HAVE_LRINTF>
85
85
)
86
+
87
+ # Helper function to configure pkg-config files
88
+ function (configure_pkg_config_file pkg_config_file_in )
89
+ set (prefix ${CMAKE_INSTALL_PREFIX} )
90
+ set (exec_prefix ${CMAKE_INSTALL_FULL_BINDIR} )
91
+ set (libdir ${CMAKE_INSTALL_FULL_LIBDIR} )
92
+ set (includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR} )
93
+ set (VERSION ${PROJECT_VERSION} )
94
+ string (REPLACE ".in" "" pkg_config_file ${pkg_config_file_in} )
95
+ configure_file (${pkg_config_file_in} ${pkg_config_file} @ONLY )
96
+ endfunction ()
97
+
98
+ configure_pkg_config_file (opusfile.pc.in )
99
+ configure_pkg_config_file (opusurl.pc.in )
100
+
86
101
install (TARGETS opusfile
87
102
EXPORT OpusFileTargets
88
103
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR} "
@@ -92,6 +107,10 @@ install(TARGETS opusfile
92
107
PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR} /opus"
93
108
)
94
109
110
+ install (FILES ${CMAKE_CURRENT_BINARY_DIR} /opusfile.pc ${CMAKE_CURRENT_BINARY_DIR} /opusurl.pc
111
+ DESTINATION ${CMAKE_INSTALL_LIBDIR} /pkgconfig
112
+ )
113
+
95
114
if (NOT OP_DISABLE_HTTP )
96
115
find_package (OpenSSL REQUIRED )
97
116
You can’t perform that action at this time.
0 commit comments