Skip to content
Snippets Groups Projects
Commit 6e3558e3 authored by Brad Barber's avatar Brad Barber
Browse files

- Updated CMakeLists.txt to compile shared and static libraries and link the

   command line utilities to the shared one.  Allows install of
   targets, libqhull.h, and html docs.  [M. Moll]
- Fixed location of qhull.man and rbox.man in src/Makefile.txt [M. Moll]
n
parent d05e9ba1
No related branches found
No related tags found
No related merge requests found
......@@ -6,3 +6,4 @@ endif(COMMAND cmake_policy)
add_subdirectory(src)
install(DIRECTORY html DESTINATION share/doc/qhull)
......@@ -23,19 +23,25 @@ set(
file(GLOB qhull_hdr *.h)
add_library(qhull ${qhull_src})
add_library(qhull SHARED ${qhull_src})
target_link_libraries(qhull m)
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)
if(UNIX)
if(APPLE)
set_target_properties(qhull PROPERTIES set(qhullcmd_SOURCES unix.c)
INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")set(rbox_SOURCES rbox.c)
else(APPLE)set(qconvex_SOURCES qconvex.c)
set_target_properties(qhull PROPERTIES set(qdelaunay_SOURCES qdelaun.c)
INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib"set(qvoronoi_SOURCES qvoronoi.c)
INSTALL_RPATH_USE_LINK_PATH TRUEset(qhalf_SOURCES qhalf.c)
BUILD_WITH_INSTALL_RPATH FALSE)
endif(APPLE)
endif(UNIX)
add_library(qhullstatic STATIC ${qhull_src})
set_property(TARGET qhullstatic PROPERTY OUTPUT_NAME "qhull")
add_executable(qhullcmd ${qhullcmd_SOURCES})
target_link_libraries(qhullcmd qhull)
set_property(TARGET qhullcmd PROPERTY OUTPUT_NAME "qhull")
add_executable(rbox ${rbox_SOURCES})
target_link_libraries(rbox qhull)
......@@ -52,3 +58,8 @@ target_link_libraries(qvoronoi qhull)
add_executable(qhalf ${qhalf_SOURCES})
target_link_libraries(qhalf qhull)
install(TARGETS qhull qhullstatic qhullcmd rbox qconvex qdelaunay qvoronoi qhalf
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
install(FILES libqhull.h DESTINATION include)
......@@ -74,9 +74,9 @@ HFILES= user.h libqhull.h qhull_a.h geom.h io.h mem.h merge.h poly.h random.h qs
TXTFILES= ../Announce.txt ../REGISTER.txt ../COPYING.txt ../README.txt Changes.txt
DOCFILES= ../html/rbox.txt ../html/qhull.txt
FILES= Makefile rbox.c user_eg.c ../eg/q_test ../eg/q_egtest ../eg/q_eg
HTMFILES= qhull.man rbox.man qh-code.htm qh-optg.htm qh-optt.htm qh-optp.htm \
HTMFILES= ../html/qhull.man ../html/rbox.man qh-code.htm qh-optg.htm qh-optt.htm \
index.htm qh-quick.htm qh-impre.htm qh-eg.htm \
qh-optc.htm qh-opto.htm qh-optf.htm qh-optq.htm \
qh-optc.htm qh-opto.htm qh-optf.htm qh-optp.htm qh-optq.htm \
qh-c.htm qh-faq.htm qhull.htm qconvex.htm qdelaun.htm \
qh-geom.htm qh-globa.htm qh-io.htm qh-mem.htm qh-merge.htm \
qh-poly.htm qh-qhull.htm qh-set.htm qh-stat.htm qh-user.htm \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment