[Kst] branches/work/kst/portto4/kst
Peter Kümmel
syntheticpp at gmx.net
Sun Mar 18 13:31:21 UTC 2012
SVN commit 1286183 by kuemmel:
build 3rdparty libs with cmake
A cmake/3rdparty (directory)
AM cmake/3rdparty/CMakeLists.txt
A cmake/3rdparty/cfitsio (directory)
AM cmake/3rdparty/cfitsio/CMakeLists.txt
A cmake/3rdparty/gsl (directory)
AM cmake/3rdparty/gsl/CMakeLists.txt
AM cmake/3rdparty/gsl/README.txt
AM cmake/3rdparty/gsl/config.h [License: UNKNOWN]
AM cmake/3rdparty/gsl/gsl-mingw.patch
AM cmake/3rdparty/gsl/gsl-msvc.patch
A cmake/3rdparty/matio (directory)
AM cmake/3rdparty/matio/CMakeLists.txt
AM cmake/3rdparty/matio/matioConfig.h.mingw.cmake
AM cmake/3rdparty/matio/matio_pubconf.h.mingw.cmake
A cmake/3rdparty/netcdf (directory)
AM cmake/3rdparty/netcdf/CMakeLists.txt
AM cmake/3rdparty/netcdf/README.txt
AM cmake/3rdparty/netcdf/config-mingw.h [License: UNKNOWN]
AM cmake/3rdparty/netcdf/config-msvc.h [License: UNKNOWN]
A cmake/3rdparty/netcdf/cxx (directory)
AM cmake/3rdparty/netcdf/cxx/CMakeLists.txt
AM cmake/3rdparty/netcdf/inttypes.h [License: BSD]
A cmake/3rdparty/netcdf/libsrc (directory)
AM cmake/3rdparty/netcdf/libsrc/CMakeLists.txt
AM cmake/3rdparty/netcdf/stdint.h [License: BSD]
M +20 -13 cmake/CMakeLists.txt
M +3 -1 cmake/modules/FindCFITSIO.cmake
M +3 -1 cmake/modules/FindGetdata.cmake
M +3 -3 cmake/modules/FindGsl.cmake
M +3 -1 cmake/modules/FindMatio.cmake
M +3 -1 cmake/modules/FindNetcdf.cmake
D misc/cfitsio-windows (directory)
D misc/gsl-windows (directory)
D misc/matio-windows (directory)
M +10 -1 misc/mingw-release-build-deps.bat
D misc/netcdf-windows (directory)
--- branches/work/kst/portto4/kst/cmake/CMakeLists.txt #1286182:1286183
@@ -1,5 +1,12 @@
cmake_minimum_required(VERSION 2.8)
+# figure out if we use MinGW with Ninja: call with -DCC=gcc
+if(WIN32 AND CMAKE_GENERATOR MATCHES Ninja AND CC MATCHES gcc)
+ find_file(mingw_make mingw32-make.exe)
+ get_filename_component(mingw_bin_dir ${mingw_make} PATH)
+ set(CMAKE_RC_COMPILER ${mingw_bin_dir}/windres.exe)
+endif()
+
project(Kst)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/modules")
@@ -25,6 +32,7 @@
kst_option(pch "Use precompiled headers" ON all)
kst_option(svnversion "Use svnversion's output for Kst's version information" ON all)
kst_option(rpath "Use rpath" ON gcc)
+kst_option(3rdparty_build "Download and build 3rd party libraries" OFF win)
kst_option(3rdparty_download "Download precompiled 3rd party libraries" OFF win)
kst_option(console "Open console on Windows" OFF win)
kst_option(edit_cont "Enable \"Edit and Continue\" for Visual Studio" OFF win)
@@ -33,6 +41,13 @@
message(STATUS)
+if(kst_release)
+ set(CMAKE_BUILD_TYPE Release)
+else()
+ set(CMAKE_BUILD_TYPE Debug)
+endif()
+
+
set(kst_version_major 2)
if(kst_version_string)
set(kst_version ${kst_version_string})
@@ -42,8 +57,10 @@
set(kst_version ${kst_version_major}.${kst_version_minor}.${kst_version_patch})
endif()
-
-if(kst_3rdparty_download)
+if(kst_3rdparty_build)
+ set(kst_3rdparty_dir ${CMAKE_BINARY_DIR}/3rdparty/installed)
+ add_subdirectory(3rdparty)
+elseif(kst_3rdparty_download)
message(STATUS "Checking downloaded 3rd party binaries.")
set(_deps kst-3rdparty-win32-deps)
set(_file ${_deps}.tar.bz2)
@@ -89,15 +106,10 @@
if(kst_3rdparty)
message(STATUS "3rd party libs for plugins--------------------")
find_package(Getdata)
- message(STATUS "")
find_package(Gsl)
- message(STATUS "")
find_package(Netcdf)
- message(STATUS "")
find_package(Matio)
- message(STATUS "")
find_package(CFITSIO)
- #find_package(Dmc)
message(STATUS "----------------------------------------------")
else()
message(STATUS "Building plugins depending on 3rd party libraries suppressed")
@@ -107,11 +119,6 @@
# React on options
-if(kst_release)
- set(CMAKE_BUILD_TYPE Release)
-else()
- set(CMAKE_BUILD_TYPE Debug)
-endif()
if(kst_verbose)
set(CMAKE_VERBOSE_MAKEFILE 1)
@@ -182,7 +189,7 @@
-if(WIN32)
+if(MSVC)
set(kst_debug_postfix d)
endif()
--- branches/work/kst/portto4/kst/cmake/modules/FindCFITSIO.cmake #1286182:1286183
@@ -1,4 +1,5 @@
+if(NOT CFITSIO_INCLUDEDIR)
include(FindPkgConfig)
pkg_check_modules(cfitsio QUIET cfitsio)
@@ -20,6 +21,7 @@
PATHS ${kst_3rdparty_dir}
)
endif()
+endif()
#message(STATUS "CFITSIO: ${CFITSIO_INCLUDEDIR}")
#message(STATUS "CFITSIO: ${CFITSIO_LIBRARIES}")
@@ -36,6 +38,6 @@
ELSE()
MESSAGE(STATUS "Not found: CFITSIO, set CFITSIO_DIR")
ENDIF()
+message(STATUS "")
-
--- branches/work/kst/portto4/kst/cmake/modules/FindGetdata.cmake #1286182:1286183
@@ -1,4 +1,5 @@
+if(NOT GETDATA_INCLUDEDIR)
include(FindPkgConfig)
pkg_check_modules(PKGGETDATA QUIET getdata>=0.6.0)
@@ -46,6 +47,7 @@
else()
set(GETDATA_LIBRARIES ${GETDATA_LIBRARIES_RELEASE})
endif()
+endif()
IF(GETDATA_INCLUDEDIR AND GETDATA_INCLUDEDIR)
@@ -58,5 +60,5 @@
MESSAGE(STATUS "Not found: Getdata, GETDATA_DIR")
ENDIF()
+message(STATUS "")
-
--- branches/work/kst/portto4/kst/cmake/modules/FindGsl.cmake #1286182:1286183
@@ -1,7 +1,7 @@
# use pkg to find the library name and pathes,
# but use this iformation in find_* only
-
+if(NOT GSL_INCLUDEDIR)
include(FindPkgConfig)
pkg_check_modules(PKGGSL gsl)
@@ -28,8 +28,8 @@
PATHS ${kst_3rdparty_dir} ${PKGGSL_LIBRARY_DIRS})
list(APPEND GSL_LIBRARIES ${lib})
endforeach()
+endif()
-
if(GSL_INCLUDEDIR AND GSL_LIBRARIES)
set(GSL_INCLUDE_DIR ${GSL_INCLUDEDIR} ${GSL_INCLUDEDIR}/..)
set(gsl 1)
@@ -40,5 +40,5 @@
message(STATUS "Not found: Gsl, set GSL_DIR")
endif()
+message(STATUS "")
-
--- branches/work/kst/portto4/kst/cmake/modules/FindMatio.cmake #1286182:1286183
@@ -1,6 +1,7 @@
# copied from FindGsl.cmake
+if(NOT MATIO_INCLUDEDIR)
include(FindPkgConfig)
pkg_check_modules(PKGMATIO matio)
@@ -28,6 +29,7 @@
list(APPEND MATIO_LIBRARIES ${lib})
endforeach()
+endif()
if(MATIO_INCLUDEDIR AND MATIO_LIBRARIES)
set(MATIO_INCLUDE_DIR ${MATIO_INCLUDEDIR} ${MATIO_INCLUDEDIR}/..)
@@ -39,5 +41,5 @@
message(STATUS "Not found: matio, set MATIO_DIR")
endif()
+message(STATUS "")
-
--- branches/work/kst/portto4/kst/cmake/modules/FindNetcdf.cmake #1286182:1286183
@@ -1,4 +1,5 @@
+if(NOTNETCDF_INCLUDEDIR)
include(FindPkgConfig)
pkg_check_modules(NETCDF QUIET netcdf)
@@ -45,6 +46,7 @@
set(NETCDF_LIBRARY_CPP ${netcdf_cpp})
endif()
endif()
+endif()
#message(STATUS "NETCDF: ${NETCDF_INCLUDEDIR}")
#message(STATUS "NETCDF: ${NETCDF_LIBRARY_C}")
@@ -60,5 +62,5 @@
MESSAGE(STATUS "Not found: NetCDF, set NETCDF_DIR")
ENDIF()
+message(STATUS "")
-
--- branches/work/kst/portto4/kst/misc/mingw-release-build-deps.bat #1286182:1286183
@@ -2,10 +2,19 @@
:: TODO specify path for sources
:: TODO copy cmake files to sources
-set KSTDEPS=q:\kst-3rdparty-win32-deps-1.0
+set KSTDEPS=e:\sandbox\kst-3rdparty-win32-deps-1.0
rmdir /s/q %KSTDEPS%
del CMakeCache.txt
+cmake e:\sandbox\kst\kst\misc\matio-windows -Dmatio_dir=e:/sandbox/matio/matio -G"CodeBlocks - MinGW Makefiles" -DCMAKE_VERBOSE_MAKEFILE=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%KSTDEPS%
+mingw32-make
+mingw32-make install/strip
+
+exit /b
+
+mingw32-make install/strip
+
+del CMakeCache.txt
cmake ..\kst\misc\netcdf-windows -Dnetcdf_sources=Q:/netcdf/netcdf-4.1.1/netcdf-4.1.1 -G"MinGW Makefiles" -DCMAKE_VERBOSE_MAKEFILE=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%KSTDEPS%
mingw32-make install/strip
More information about the Kst
mailing list