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
8383    $<$<BOOL :${OP_ENABLE_ASSERTIONS} >:OP_ENABLE_ASSERTIONS>
8484    $<$<BOOL :${OP_HAVE_LRINTF} >:OP_HAVE_LRINTF>
8585)
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+ 
86101install (TARGETS opusfile
87102  EXPORT  OpusFileTargets
88103  RUNTIME DESTINATION  "${CMAKE_INSTALL_BINDIR} " 
@@ -92,6 +107,10 @@ install(TARGETS opusfile
92107  PUBLIC_HEADER  DESTINATION  "${CMAKE_INSTALL_INCLUDEDIR} /opus" 
93108)
94109
110+ install (FILES  ${CMAKE_CURRENT_BINARY_DIR} /opusfile.pc ${CMAKE_CURRENT_BINARY_DIR} /opusurl.pc
111+   DESTINATION  ${CMAKE_INSTALL_LIBDIR} /pkgconfig
112+ )
113+ 
95114if (NOT  OP_DISABLE_HTTP)
96115  find_package (OpenSSL REQUIRED)
97116
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments