borromeotlhs / amop

Automatically exported from code.google.com/p/amop
0 stars 0 forks source link

pkg-config support #10

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Having pkg-config support would be nice.

I have attached an example of such an amop.pc file that I've made by hand,
so that I can use amop from a local dir. (It should be possible to let
cmake create this file with the correct paths from an amop.pc.in template).

Original issue reported on code.google.com by ibo...@gmail.com on 21 Nov 2008 at 8:35

Attachments:

GoogleCodeExporter commented 9 years ago
Add this fragment to the top CMakeLists.txt to get pkg-config support.

The fragment generates an amop.pc into the CMAKE_BINARY_DIR and installs it 
when you
run the "make install".

With this fragment you can ignore the amop.pc I've sent above.

# support for pkg-config
FILE(WRITE ${CMAKE_BINARY_DIR}/amop.pc "prefix=${CMAKE_INSTALL_PREFIX}
exec_prefix=\${prefix}
libdir=\${exec_prefix}/lib
includedir=\${prefix}/include

Name: AMOP
Description: A mock library.
Version: 0.31
URL: http://code.google.com/p/amop/
Libs: -L\${libdir} -lAmop
Cflags: -I\${includedir}
")

INSTALL(FILES ${CMAKE_BINARY_DIR}/amop.pc DESTINATION lib/pkgconfig)

Original comment by ibo...@gmail.com on 24 Nov 2008 at 3:09