On 2010-01-25 08:26-0800 David MacMahon wrote:

Hi, Alan (et al),

On Jan 24, 2010, at 19:49 , Alan W. Irwin wrote:

That file is part of the tarball.  Look for it in qhull-2010.1/src/.  The
CMake-based build system that comes with the tarball really sucks (static
libraries only, no install). Werner (with some help from me) is putting
together an improved version of that which we plan to donate to the qhull
developers. I attach a modified qhull-2010.1/src/CMakeLists.txt that worked
for me on Linux, and I encourage you to generalize it for your own needs and
get back to us.

Thanks. I found that using the old autotools build for qhull (only available via source code checkout; not in the release tarball) installed the header files where they are expected. I also tried the CMakeLists.txt you attached and that too put the header files where they need to be. The only difference I noticed was that the CMakeLists.txt installation installed the qhull executable as "$prefix/bin/qhullcmd" instead of "$prefix/bin/qhull".

Thanks, Dave, for that report.

I attach (for Dave, Werner, and anybody else who builds qhull)
a CMakeLists.txt file that corrects the qhullcmd issue that
Dave found in my previous CMakeLists.txt file.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________
project(qhull_lib)

# Configurable items here.

option(USE_RPATH "Use -rpath when linking libraries, executables" ON)

# libraries are all shared by default
option(BUILD_SHARED_LIBS "Build shared libraries" ON)

# Change before each release whenever there has been an API change of any
# kind.
set(qhull_SOVERSION 5)
set(qhull_VERSION ${qhull_SOVERSION}.0.0)

# Order object files by frequency of execution.  Small files at end.
set(
    qhull_src
        rboxlib.c
        user.c
        global.c
        stat.c
        io.c
        geom2.c
        poly2.c
        merge.c
        libqhull.c
        geom.c
        poly.c
        qset.c
        mem.c
        usermem.c
        userprintf.c
        random.c
)

file(GLOB qhull_hdr *.h)
install(FILES ${qhull_hdr} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/qhull)


add_library(qhull ${qhull_src})
target_link_libraries(qhull m)
set_target_properties(
  qhull
  PROPERTIES 
  SOVERSION ${qhull_SOVERSION}
  VERSION ${qhull_VERSION}
  INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/lib
  )
install(TARGETS qhull DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)


set(qhullcmd_SOURCES  unix.c)
set(rbox_SOURCES  rbox.c)
set(qconvex_SOURCES  qconvex.c)
set(qdelaunay_SOURCES  qdelaun.c)
set(qvoronoi_SOURCES  qvoronoi.c)
set(qhalf_SOURCES  qhalf.c)

set(TARGET_LIST)
list(APPEND TARGET_LIST qhullcmd)
list(APPEND TARGET_LIST rbox)
list(APPEND TARGET_LIST qconvex)
list(APPEND TARGET_LIST qdelaunay)
list(APPEND TARGET_LIST qvoronoi)
list(APPEND TARGET_LIST qhalf)

foreach(TARGET ${TARGET_LIST})
  add_executable(${TARGET} ${${TARGET}_SOURCES})
  target_link_libraries(${TARGET} qhull)
  if(USE_RPATH)
    set_target_properties(
      ${TARGET}
      PROPERTIES 
      INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib
      INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/bin
      )
  else(USE_RPATH)
    set_target_properties(
      ${TARGET}
      PROPERTIES 
      INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/bin
      )
  endif(USE_RPATH)
  install(TARGETS ${TARGET} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
endforeach(TARGET ${TARGET_LIST})

set_target_properties(qhullcmd PROPERTIES OUTPUT_NAME qhull)
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to