Greetings,
I have a projest (normally built with autotools )  with 
libfoo.pc.in.  

suppose libfoo.pc.in  looks like this:-
#---------------------
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@/foo2

Name: libfoo
Description:a library about swine foods
Version: @VERSION@
Libs: -L${libdir} -Wl,-rpath,${exec_prefix}/lib -lfoo
Cflags: -I${includedir}
#-------------------------------

 I want to replace all the variables with the  @@  and generate the libfoo.pc 
and install this at installation time to ~/prefix/lib/pkgconfig 


Is this simply a case of running configure_file like so:-

#--------------
configure_file(${CMAKE_SOURCE_DIR}/libfoo.pc.in   
${CMAKE_BINARY_DIR}/libfoo.pc  @ONLY)
install(file ${CMAKE_BINARY_DIR}/libfoo.pc DESTINATION lib/pkgconfig )
#-------------------------

and will the required variables be substitued ? 
or is there more to it. (in-other-words  will I have to  set varibles such as 
these (or somesuch ) ????
set(libdir ${CMAKE_INSTALL_PREFIX}/lib )
set(includedir ${CMAKE_INSTALL_PREFIX}/include )
set(exec_prefix ${CMAKE_INSTALL_PREFIX}/bin )
???

Thanks in advance
sincerely
luxInteg
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to