Hi Alan,

thank you for the cookbook to make the appropriate changes.
> 
> On your Linux box, find and xargs really are quite helpful at answering
> such questions:
> 
> [EMAIL PROTECTED]> find -name CMakeLists.txt|xargs grep QHULL_LIB
> ./lib/nn/CMakeLists.txt:target_link_libraries(csironn ${QHULL_LIB})

:) I used some sort of grep for Windows, but only looked in *.cmake 
files ...

> * I agree you should have a separate FindQHULL.cmake module that is in the
>    standard "find_package" form of modules.  I took some pains to make sure
>    FindCD.cmake is in standard form so it should be a good template to
>    follow, but if you want to double-check the documentation of the
>    find_package form of modules it is in
>    $YOUR_INSTALL_PREFIX/share/CMake/Modules/readme.txt, where
>    YOUR_INSTALL_PREFIX is the install prefix for your cmake installation. In
>    particular FindQHULL.cmake should define the following:
> 
> #  QHULL_FOUND, if false, do not try to use QHULL.
> #  QHULL_INCLUDE_DIRS, where to find qhull/qhull_a.h.
> #  QHULL_LIBRARIES, the libraries to link against to use libqhull.
> #  QHULL_LIBRARY_DIRS, the directory where libqhull is found.
> 
> N.B. use qhull/qhull_a.h consistently, not qhull_a.h.

I added FindQHULL.cmake to the repository, according to the FindCD.cmake 
and it worked for MinGW at least.
> 
> * Reorganize csiro.cmake.  Invoke find_package(QHULL) there.  Use
>    QHULL_FOUND to control Boolean logic there.  Change QHULL_LIB ==>
>    QHULL_LIBRARIES (see above for what variables are defined in
>    FindQHULL.cmake) there.  Continue to use
>    check_function_exists(qh_new_qhull QH_NEW_VARIABLE)

I did this.

>    and change from
> 
>    check_include_file("qhull/qhull_a.h" QHULL_INCLUDE)
> 
>    to the following:
> 
>    set(CMAKE_REQUIRED_INCLUDES ${QHULL_INCLUDE_DIRS})
>    check_include_file("qhull/qhull_a.h" QHULL_A_VARIABLE)
>    set(CMAKE_REQUIRED_INCLUDES)

Why is this step necessary? I already look for qhull/qhull_a.h in 
FindQHULL.cmake anyway, if the file doesn't exist we never reach these 
lines?

> 
> * Change QHULL_LIB ==> QHULL_LIBRARIES in lib/nn/CMakeLists.txt (see above
>    command where are searched for all instances of QHULL_LIB in CMakeLists.txt
>    files.

did that too.

> 
> * Note above we replaced QHULL_INCLUDE by QHULL_A_VARIABLE in csiro.cmake.
>    QHULL_INCLUDE was never used in any of the CMakeLists.txt files, but we
>    have renamed it to make that more clear.  The actual variable meant to
>    transmit the header file location to the CMakeLists.txt files is
>    QHULL_INCLUDE_DIRS (see above).  Thus you will have to change
>    lib/nn/CMakeLists.txt to compile with the -I${QHULL_INCLUDE_DIRS} option
>    for the case of non-standard QHULL installation location.

and this too.
> 
> Werner, the new capability of using a qhull that is installed in a
> non-standard location is well worth having for our CBS, and I appreciate you
> implementing and testing it.  I hope I have gotten all the above details
> right, but in any case you should check what I have said by looking at
> http://www.cmake.org/HTML/Documentation.html and also by checking other
> "find_package" modules in $YOUR_INSTALL_PREFIX/share/CMake/Modules/
> 
> Good luck with the implementation.

I've just commited all the changes and tested it with mingw so far and 
it worked (all compiled and examples worked) (for the static case, I 
think the shared library won't because of this MAKINGDLL issue - I have 
to change this later on).

I wrote a simple cmake script for qhull, which compiles the library and 
install/copies the library and header files to a directory. What should 
I do with this file, where should I commit it? I think the qhull 
community might not be interested, since it doesn't compile all the 
executables (would be very easy to add though) and since the last 
release was 2003 I don't know how active they are anyway. But I want to 
save that file somewhere in our cvs repository. Instructions to use the 
qhull library on Windows can be provided in the wiki (and in the manual).

The same "problem" I have for the agg library, where I also made a 
simple cmake script.

I hope that these changes don't break anything on Linux - it's not 
possible for me in the moment to easily check this. So it would be good 
if these changes are tested and reviewed on other platforms.

Thanks,
Werner

-- 
Dipl. Ing. Werner Smekal
Institut fuer Allgemeine Physik
Technische Universitaet Wien
Wiedner Hauptstr 8-10
A-1040 Wien
Austria

email: [EMAIL PROTECTED]
web:   http://www.iap.tuwien.ac.at/~smekal
phone: +43-(0)1-58801-13463 (office)
        +43-(0)1-58801-13469 (laboratory)
fax:   +43-(0)1-58801-13499

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to