Long story short, I'm in the process of switching from Autotools to Cmake (www.cmake.org) and to do a complete port, I wrote the necessary cmake code to do compatibility testing & build the libopts tearoff. While I wouldn't consider this fully tested, it does compile/link for me on OSX and CentOS4.
I figured it might be interesting enough to add to the tearoff or
package up for other people considering using Cmake.
Attachments:
- CheckLibopts.cmake - cmake module to test platform capabilities.
- CMakeLists.txt - Cmake file for libopts tearoff
- config.h.cmake - config.h template for cmake
Users will need to call something like:
IF(USE_LIBOPTS)
message(STATUS "Configuring libopts tearoff...")
INCLUDE(CheckLibopts)
CHECK_LIBOPTS_TEAROFF(${CMAKE_SOURCE_DIR}/libopts 5.9.7)
ELSE(USE_LIBOPTS)
message(STATUS "Skipping libopts tearoff")
ENDIF(USE_LIBOPTS)
and then add: ${CMAKE_SOURCE_DIR}/libopts/libopts.a
to their list of TARGET_LINK_LIBRARIES
There's a good chance that my code will change in the future (I'm
still working on various cmake things), but I'll be sure to send
updates for any major changes.
--
Aaron Turner
http://synfin.net/
http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & Windows
Those who would give up essential Liberty, to purchase a little
temporary Safety,
deserve neither Liberty nor Safety.
-- Benjamin Franklin
ADD_LIBRARY(opts STATIC libopts.c)
SET_TARGET_PROPERTIES(opts
PROPERTIES LINK_FLAGS "-version-info 32:0:7 -DHAVE_CONFIG_H")
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/libopts)
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/libopts/config.h.cmake
${CMAKE_SOURCE_DIR}/libopts/config.h @ONLY)
ADD_DEPENDENCIES(opts
config.h
ag-char-map.h
autoopts/options.h autoopts/usage-txt.h autoopts.c
autoopts.h boolean.c compat/compat.h
compat/pathfind.c compat/snprintf.c compat/strchr.c
compat/strdup.c compat/windows-config.h configfile.c
cook.c enumeration.c environment.c
file.c genshell.c genshell.c
load.c makeshell.c nested.c
numeric.c parse-duration.c parse-duration.h
pgusage.c proto.h putshell.c
reset.c restore.c save.c
sort.c stack.c streqvcmp.c
text_mmap.c time.c tokenize.c
usage.c value-type.c value-type.h
version.c xat-attribute.c xat-attribute.h)
CheckLibopts.cmake
Description: Binary data
config.h.cmake
Description: Binary data
------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H
_______________________________________________ Autogen-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/autogen-users
