Hi,
yesterday I managed to add the cgm driver do the Windows build of
plplot. I needed to write a CMakeLists.txt, since only Makefiles for
unix were provided. This was a matter of less than 10 minutes - CMake
rocks. Anyway, after a small change in the plplot cmake files the cd
library was found, and I was able to use the cgm driver (since I don't
know what applications can open cgm files, I coudn't test the files :).
Anyway, here some instructions, which I will also add to the Wiki.
* Download the cd library here:
http://prdownloads.sourceforge.net/plplot/cd1.3.tar.gz?download and
untar it in a suitable place
* copy the attached CMakeLists.txt in the main dir (cd1.3)
* cd cd1.3
* mkdir build
* cd build
* cmake -G "MinGW Makefiles" -DBUILD_SHARED_LIBS=OFF
-DCMAKE_INSTALL_PREFIX=local ..
or
* cmake -G "NMake Makefiles" -DBUILD_SHARED_LIBS=OFF
-DCMAKE_INSTALL_PREFIX=local ..
(for Windows compiler other than MinGW and Cygwin no shared libraries
will be built)
* mingw32-make or nmake
* mingw32-make install or nmake install (files will be copied in local
directory)
* set environment variables so that cmake can find the library and
header (I usually set this variables in a batch file which I run
automatically when I start the CLI):
@set CDDIR=C:\cd1.3\build\local
@set CMAKE_INCLUDE_PATH=%CDDIR%\include
@set CMAKE_LIBRARY_PATH=%CDDIR%\lib
The cmake script of plplot should now find the cd library and compile
the cgm driver. As written above, no shared library support for
compilers other than MinGW and Cygwin (because of the "dll hell" :). I
again had to modify the cgm.cmake a little bit, since the addition of
the library flags was not platform independent. So we have now 16
drivers for windows available!
We should maybe add the CMakeLists.txt to the cd package and put it on
the sf website for download? This CMakeLists.txt should also work for
Linux, so someone should test it if he has time.
Regards,
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
# CMakeLists.txt for the cd library and executables
# run this cmake command:
# cmake -G "MinGW Makefiles" -DBUILD_SHARED_LIBS=OFF
-DCMAKE_INSTALL_PREFIX=local ..
# or similar.
# no shared library support for win32 compilers except cygwin, mingw
IF( WIN32 AND NOT CYGWIN AND NOT MINGW )
IF( BUILD_SHARED_LIBS )
SET( BUILD_SHARED_LIBS OFF )
MESSAGE( " >> There is no shared library support for your Windows
compiler!\n >> Turning option off." )
ENDIF( BUILD_SHARED_LIBS )
ENDIF( WIN32 AND NOT CYGWIN AND NOT MINGW )
# add cd library
set( cd_LIB_SRCS cd.c )
set( cd_LIB_HDRS cd.h defines.h )
ADD_LIBRARY( cd ${cd_LIB_SRCS} )
# add samples
set( cd_EXE color16 cdsimple cdtext cdmulti cdexpert )
foreach(EXE ${cd_EXE})
ADD_EXECUTABLE( ${EXE} ${EXE}.c )
TARGET_LINK_LIBRARIES( ${EXE} cd )
endforeach(EXE ${cd_EXE})
# install library and binaries
INSTALL( TARGETS
cd ${cd_EXE}
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)
# install header files
INSTALL(
FILES ${cd_LIB_HDRS}
DESTINATION include
)-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/plplot-devel