[Kst] branches/work/kst/portto4/kst

Peter Kümmel syntheticpp at gmx.net
Sat Jan 19 21:37:15 UTC 2013


SVN commit 1333820 by kuemmel:

also build 3rdparty plugins

 M  +1 -0      .travis.yml  
 M  +33 -13    cmake/CMakeLists.txt  
 M  +3 -1      cmake/modules/FindCFITSIO.cmake  
 M  +3 -2      cmake/modules/FindGetdata.cmake  
 M  +4 -1      cmake/modules/FindGsl.cmake  
 M  +6 -0      cmake/modules/FindMatio.cmake  
 M  +3 -1      cmake/modules/FindNetcdf.cmake  
 M  +0 -24     cmake/modules/KstCrossCompile.cmake  
 M  +12 -16    cmake/travis.sh  


--- branches/work/kst/portto4/kst/.travis.yml #1333819:1333820
@@ -13,6 +13,7 @@
  - sudo apt-get autoremove
 
 script:
+ - ./cmake/travis.sh qt4
  - ./cmake/travis.sh qt5 
  - ./cmake/travis.sh qt5 x64
 
--- branches/work/kst/portto4/kst/cmake/CMakeLists.txt #1333819:1333820
@@ -133,7 +133,24 @@
 	configure_file(${CMAKE_BINARY_DIR}/svnrevision.h.tmp ${CMAKE_BINARY_DIR}/svnrevision.h COPYONLY)
 endif()
 
+
 # Find 3rd party libraries
+if(kst_3rdparty)
+  message(STATUS "3rd party libs for plugins--------------------")
+  find_package(Getdata)
+  find_package(Gsl)
+  find_package(Netcdf)
+  find_package(Matio)
+  find_package(CFITSIO)
+  message(STATUS "----------------------------------------------")
+else()
+  message(STATUS "Building plugins depending on 3rd party libraries suppressed")
+endif()
+message(STATUS)
+
+
+
+# Find 3rd party libraries
 if (kst_qt5)
 	# http://doc-snapshot.qt-project.org/5.0/cmake-manual.html
 	cmake_minimum_required(VERSION 2.8.9)
@@ -160,6 +177,11 @@
 	set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DQT_NO_DEBUG")
 	include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS}) # Qt5 bug?
 else()
+	if(kst_cross)
+		# Cross-compiled Qt, branch 4.8.4 from https://gitorious.org/~syntheticpp/qt/qt4
+		set(QT_MINGW_DIR ${kst_qt4} CACHE PATH "Qt for Mingw" FORCE)
+		set(CMAKE_FIND_ROOT_PATH /usr/${TOOLNAME} ${QT_MINGW_DIR} CACHE PATH "Mingw find root path" FORCE)
+	endif()
 	find_package(Qt4 REQUIRED)
 	include(${QT_USE_FILE})
 	if(MINGW)
@@ -176,20 +198,9 @@
 endif()
 
 message(STATUS)
-if(kst_3rdparty AND NOT kst_cross)
-  message(STATUS "3rd party libs for plugins--------------------")
-  find_package(Getdata)
-  find_package(Gsl)
-  find_package(Netcdf)
-  find_package(Matio)
-  find_package(CFITSIO)
-  message(STATUS "----------------------------------------------")
-else()
-  message(STATUS "Building plugins depending on 3rd party libraries suppressed")
-endif()
-message(STATUS)
 
 
+
 # React on options
 
 
@@ -246,6 +257,11 @@
 	set(kst_pch 0 CACHE BOOL "Disable pch because we build merged" FORCE)
 endif()
 
+if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+	set(x64 TRUE)
+endif()
+
+
 if(WIN32)
 	add_definitions(-D_WIN32_WINNT=0x0501) # Windows XP
 	# on 32 bit Windows we must explicitely enable >2GB support
@@ -261,7 +277,7 @@
 	endmacro()
 	if(MSVC)
 		link_large_address(/LARGEADDRESSAWARE)
-	elseif(NOT kst_cross) # TODO check for x86_64
+	elseif(NOT x64)
 		link_large_address(-Wl,--large-address-aware)
 	endif()
 endif()
@@ -337,7 +353,11 @@
 
 if(kst_install_prefix)
 	if(WIN32)
+		if(x64)
+			set(CPACK_PACKAGE_FILE_NAME ${kst_install_prefix}-win64)
+		else()
 		set(CPACK_PACKAGE_FILE_NAME ${kst_install_prefix}-win32)
+		endif()
 	else()
 		set(CPACK_PACKAGE_FILE_NAME kst-${kst_version_string}-binary)
 	endif()
--- branches/work/kst/portto4/kst/cmake/modules/FindCFITSIO.cmake #1333819:1333820
@@ -1,8 +1,10 @@
 
 if(NOT CFITSIO_INCLUDEDIR)
+
+if(NOT kst_cross)
 include(FindPkgConfig)
-
 pkg_check_modules(cfitsio QUIET cfitsio)
+endif()
 
 if(CFITSIO_INCLUDEDIR AND CFITSIO_LIBRARIES)
 	set(CFITSIO_LIBRARY -L${CFITSIO_LIBRARY_DIRS} ${CFITSIO_LIBRARIES})
--- branches/work/kst/portto4/kst/cmake/modules/FindGetdata.cmake #1333819:1333820
@@ -1,12 +1,13 @@
 
 if(NOT GETDATA_INCLUDEDIR)
+
+if(NOT kst_cross)
 include(FindPkgConfig)
-
 pkg_check_modules(PKGGETDATA QUIET getdata>=0.6.0)
 #message(STATUS "GD inc: ${PKGGETDATA_INCLUDEDIR}")
 #message(STATUS "GD libs: ${PKGGETDATA_LIBRARIES}")
+endif()
 
-
 # Apple: install getdata with --prefix /opt/local
 
 # FIXME: GETDATA_INCLUDEDIR AND GETDATA_LIBRARIES are set by pkg_check_modules, but
--- branches/work/kst/portto4/kst/cmake/modules/FindGsl.cmake #1333819:1333820
@@ -2,12 +2,15 @@
 # use pkg to find the library name and pathes,
 # but use this iformation in find_* only
 if(NOT GSL_INCLUDEDIR)
+
+if(NOT kst_cross)
 include(FindPkgConfig)
 pkg_check_modules(PKGGSL QUIET gsl)
+endif()
 
 if(NOT PKGGSL_LIBRARIES)
 	set(PKGGSL_LIBRARIES gsl)
-	if (UNIX)
+	if (UNIX AND NOT kst_cross)
 		set(PKGGSL_LIBRARIES ${PKGGSL_LIBRARIES} m gslcblas)
 	endif()
 endif()
--- branches/work/kst/portto4/kst/cmake/modules/FindMatio.cmake #1333819:1333820
@@ -2,8 +2,11 @@
 # copied from FindGsl.cmake
 
 if(NOT MATIO_INCLUDEDIR)
+
+if(NOT kst_cross)
 include(FindPkgConfig)
 pkg_check_modules(PKGMATIO QUIET matio)
+endif()
 
 if(NOT PKGMATIO_LIBRARIES)
 	set(PKGMATIO_LIBRARIES matio)
@@ -20,6 +23,9 @@
 	PATHS ${kst_3rdparty_dir} ${PKGMATIO_INCLUDEDIR})
 
 set(MATIO_LIBRARY_LIST)
+if(kst_3rdparty_dir)
+    list(APPEND PKGMATIO_LIBRARIES zlibstatic)
+endif()
 foreach(it ${PKGMATIO_LIBRARIES})
 	set(lib lib-NOTFOUND CACHE STRING "" FORCE)
 	FIND_LIBRARY(lib ${it} 
--- branches/work/kst/portto4/kst/cmake/modules/FindNetcdf.cmake #1333819:1333820
@@ -1,8 +1,10 @@
 
 if(NOT NETCDF_INCLUDEDIR)
+
+if(NOT kst_cross)
 include(FindPkgConfig)
-
 pkg_check_modules(NETCDF QUIET netcdf)
+endif()
 
 if(NETCDF_INCLUDEDIR AND NETCDF_LIBRARIES)
 	FIND_LIBRARY(NETCDF_LIBRARY_CPP netcdf_c++ 
--- branches/work/kst/portto4/kst/cmake/modules/KstCrossCompile.cmake #1333819:1333820
@@ -12,27 +12,3 @@
 set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
 set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
 
-if(kst_qt4)
-	# Cross-compiled Qt, branch cross-mingw from https://gitorious.org/~syntheticpp/qt/qt4
-	set(QT_MINGW_DIR ${kst_qt4} CACHE PATH "Qt for Mingw" FORCE)
-	set(CMAKE_FIND_ROOT_PATH /usr/${TOOLNAME} ${QT_MINGW_DIR} CACHE PATH "Mingw find root path" FORCE)
-endif()
-
-
-if(kst_3rdparty_dir)
-    set(getdata 1 CACHE STRING "3rdparty" FORCE)
-    set(GETDATA_INCLUDE_DIR ${kst_3rdparty_dir}/include CACHE STRING "3rdparty" FORCE)
-    set(GETDATA_LIBRARIES   ${kst_3rdparty_dir}/lib/libgetdata++.a ${kst_3rdparty_dir}/lib/libgetdata.a CACHE STRING "3rdparty" FORCE)
-    set(gsl 1 CACHE STRING "3rdparty" FORCE)
-    set(GSL_INCLUDE_DIR     ${kst_3rdparty_dir}/include/gsl ${kst_3rdparty_dir}/include/gsl/.. CACHE STRING "3rdparty" FORCE)
-    set(GSL_LIBRARIES       ${kst_3rdparty_dir}/lib/libgsl.a CACHE STRING "3rdparty" FORCE)
-    set(netcdf 1 CACHE STRING "3rdparty" FORCE)
-    set(NETCDF_INCLUDE_DIR  ${kst_3rdparty_dir}/include CACHE STRING "3rdparty" FORCE)
-    set(NETCDF_LIBRARIES    ${kst_3rdparty_dir}/lib/libnetcdf_c++.a ${kst_3rdparty_dir}/lib/libnetcdf.a CACHE STRING "3rdparty" FORCE)
-    set(matio 1 CACHE STRING "3rdparty" FORCE)
-    set(MATIO_INCLUDE_DIR   ${kst_3rdparty_dir}/include ${kst_3rdparty_dir}/include/.. CACHE STRING "3rdparty" FORCE)
-    set(MATIO_LIBRARIES     ${kst_3rdparty_dir}/lib/libmatio.a CACHE STRING "3rdparty" FORCE)
-    set(cfitsio 1 CACHE STRING "3rdparty" FORCE)
-    set(CFITSIO_INCLUDE_DIR ${kst_3rdparty_dir}/include/cfitsio;${kst_3rdparty_dir}/include/cfitsio/.. CACHE STRING "3rdparty" FORCE)
-    set(CFITSIO_LIBRARIES   ${kst_3rdparty_dir}/lib/libcfitsio.a CACHE STRING "3rdparty" FORCE)
-endif()
--- branches/work/kst/portto4/kst/cmake/travis.sh #1333819:1333820
@@ -139,19 +139,21 @@
 
 gccver=4.7.2
 if [ "$2" = "x64" ]; then
+	win=win64
 	mingw=x86_64-w64-mingw32
     exc=-seh
 	mingwdir=mingw64$exc
-	branch=Kst-64bit
+	branch=Kst-64bit-no-3rdparty-plugins-Qt5
     extlib=
     useext=
 else
+	win=win32
 	mingw=i686-w64-mingw32
 	exc=-dw2
 	mingwdir=mingw32$exc
-	branch=Kst-32bit
-    extlib=
-    useext=
+	branch=Kst-32bit-3rdparty-plugins-Qt5
+    extlib=kst-3rdparty-win32-gcc$exc-4.7.2
+    useext="-Dkst_3rdparty=1 -Dkst_3rdparty_dir=/opt/"$extlib
 fi
 
 if [ "$1" = "qt5" ]; then
@@ -160,12 +162,10 @@
 else
     qtver=4.8.4
     tarver=
-    branch=Kst-32bit-Qt4
-    extlib=kst-3rdparty-win32-gcc$exc-4.7.2
-    useext="-Dkst_3rdparty=1 -Dkst_3rdparty_dir=/opt/"$extlib
+    branch=Kst-32bit-3rdparty-plugins-Qt4
 fi
 
-qtver=Qt-$qtver-win32-g++-$mingw$exc-$gccver
+qtver=Qt-$qtver-$win-g++-$mingw$exc-$gccver
 mingwver=$mingw-gcc$exc-$gccver
 
 
@@ -262,23 +262,19 @@
 make package
 checkExitCode
 
-if [ ! -e $versionname-win32.zip ]; then
+if [ ! -e $versionname-$win.zip ]; then
     exit 1
 fi
 
 if [ "$iam" = "$travis" ]; then
     cd $startdir/kstbinary
-    if [ "$1" = "qt5" ]; then
         git checkout $branch
-    else 
-        git checkout master
-    fi
     git reset --hard HEAD^
-    cp -f $builddir/$versionname-win32.zip .
-    git add $versionname-win32.zip
+    cp -f $builddir/$versionname-$win.zip .
+    git add $versionname-$win.zip
     checkExitCode
     
-    git commit --quiet -m"Update win32 binary to version $versionname"
+    git commit --quiet -m"Update $win binary to version $versionname"
     checkExitCode
 
     git push --quiet -f


More information about the Kst mailing list