[Kst] branches/work/kst/portto4/kst
Peter Kümmel
syntheticpp at gmx.net
Sun Jan 30 13:21:17 CET 2011
SVN commit 1217992 by kuemmel:
cmake: add option to download 3rd party binaries for windows
M +5 -2 INSTALL
M +19 -1 cmake/CMakeLists.txt
M +2 -2 cmake/modules/FindCFITSIO.cmake
M +3 -3 cmake/modules/FindGetdata.cmake
M +2 -2 cmake/modules/FindGsl.cmake
M +2 -1 cmake/modules/FindNetcdf.cmake
--- branches/work/kst/portto4/kst/INSTALL #1217991:1217992
@@ -94,13 +94,15 @@
add files to the build system which are not mentioned to build. To exclude
them change their ending and re-run cmake.
+ * Projects
+ 'make help' lists the available targets.
-
Options
-------
Options could be passed by the -D prefix when running cmake.
- Available options will be listed on each cmake run:
+ Available options will be listed on each cmake run.
+ Here the options with their default value:
-- kst_release = OFF : Build release version
-- kst_merge_files = OFF : Merge files to speedup build about factor 5
@@ -109,6 +111,7 @@
-- kst_console = OFF : Open console on Windows
-- kst_install_prefix = OFF : Install path for Kst, using a default if not set
-- kst_3rdparty = ON : Build plugins depending on 3rd party libraries
+ -- kst_3rdparty_download = OFF : Download precompiled 3rd party libraries
-- kst_dataobjects = ON : Build dataobject plugins
-- kst_test = OFF : Build unit tests
-- kst_pch = OFF : Use precompiled headers
--- branches/work/kst/portto4/kst/cmake/CMakeLists.txt #1217991:1217992
@@ -23,15 +23,33 @@
kst_option(install_prefix "Install path for Kst, using a default if not set" OFF all)
kst_option(console "Open console on Windows" OFF win)
kst_option(3rdparty "Build plugins depending on 3rd party libraries" ON all)
+kst_option(3rdparty_download "Download precompiled 3rd party libraries" OFF win)
kst_option(dataobjects "Build dataobject plugins" ON all)
kst_option(test "Build unit tests" OFF all)
kst_option(pch "Use precompiled headers" ON all)
kst_option(edit_cont "Enable \"Edit and Continue\" for Visual Studio" OFF win)
kst_option(svnversion "Use svnversion's output for Kst's version information" ON all)
-
message(STATUS)
+
+if(kst_3rdparty_download)
+ message(STATUS "Checking downloaded 3rd party binaries.")
+ set(_deps kst-3rdparty-win32-deps)
+ set(_file ${_deps}.tar.bz2)
+ set(_downloaded _downloaded-NOTFOUND CACHE PATH "3rd party binaries already downloaded" FORCE)
+ find_file(_downloaded ${_file} ${CMAKE_BINARY_DIR})
+ if (NOT _downloaded)
+ # TODO move to sf.net, but sf.net is broken atm (Jan 30 2011)
+ file(DOWNLOAD http://kst-plot.kde.org/download/${_file} ${CMAKE_BINARY_DIR}/${_file}
+ EXPECTED_MD5 d2ffdb6dad509fe40f1cc9f60c88ddd5
+ SHOW_PROGRESS)
+ execute_process(COMMAND ${CMAKE_COMMAND} -E tar -xfj ${CMAKE_BINARY_DIR}/${_file})
+ endif()
+ set(kst_3rdparty_dir ${CMAKE_BINARY_DIR}/${_deps}-1.0)
+endif()
+
+
kst_revision_project_name(Revision)
add_definitions(-DKST_HAVE_SVN_REVISION_H)
if(kst_svnversion)
--- branches/work/kst/portto4/kst/cmake/modules/FindCFITSIO.cmake #1217991:1217992
@@ -11,13 +11,13 @@
HINTS
ENV CFITSIO_DIR
PATH_SUFFIXES include/cfitsio include
- PATHS
+ PATHS ${kst_3rdparty_dir}
)
FIND_LIBRARY(CFITSIO_LIBRARIES cfitsio
HINTS
ENV CFITSIO_DIR
PATH_SUFFIXES lib
- PATHS
+ PATHS ${kst_3rdparty_dir}
)
endif()
--- branches/work/kst/portto4/kst/cmake/modules/FindGetdata.cmake #1217991:1217992
@@ -20,19 +20,19 @@
HINTS
ENV GETDATA_DIR
PATH_SUFFIXES include/getdata include
- PATHS
+ PATHS ${kst_3rdparty_dir}
)
FIND_LIBRARY(GETDATA_LIBRARY_C getdata
HINTS
ENV GETDATA_DIR
PATH_SUFFIXES lib
- PATHS
+ PATHS ${kst_3rdparty_dir}
)
FIND_LIBRARY(GETDATA_LIBRARY_CPP getdata++
HINTS
ENV GETDATA_DIR
PATH_SUFFIXES lib
- PATHS
+ PATHS ${kst_3rdparty_dir}
)
endif()
--- branches/work/kst/portto4/kst/cmake/modules/FindGsl.cmake #1217991:1217992
@@ -11,13 +11,13 @@
HINTS
ENV GSL_DIR
PATH_SUFFIXES include/gsl include
- PATHS
+ PATHS ${kst_3rdparty_dir}
)
FIND_LIBRARY(GSL_LIBRARIES gsl
HINTS
ENV GSL_DIR
PATH_SUFFIXES lib
- PATHS
+ PATHS ${kst_3rdparty_dir}
)
endif()
--- branches/work/kst/portto4/kst/cmake/modules/FindNetcdf.cmake #1217991:1217992
@@ -14,6 +14,7 @@
ENV NETCDF_DIR
PATH_SUFFIXES include
PATHS
+ ${kst_3rdparty_dir}
~/Library/Frameworks
/Library/Frameworks
)
@@ -23,7 +24,7 @@
HINTS
ENV NETCDF_DIR
PATH_SUFFIXES lib
- PATHS)
+ PATHS ${kst_3rdparty_dir})
endmacro()
find_netcdf_lib(netcdf_c netcdf)
More information about the Kst
mailing list