[Kst] branches/work/kst/portto4/kst/cmake
Peter Kümmel
syntheticpp at gmx.net
Fri Jul 27 10:59:17 UTC 2012
SVN commit 1308060 by kuemmel:
add cross-compile support
M +13 -2 CMakeLists.txt
M +1 -1 misc/CMakeLists.txt
AM modules/KstCrossCompile.cmake
M +1 -1 src/kst/CMakeLists.txt
--- branches/work/kst/portto4/kst/cmake/CMakeLists.txt #1308059:1308060
@@ -7,7 +7,6 @@
set(CMAKE_RC_COMPILER ${mingw_bin_dir}/windres.exe)
endif()
-project(Kst)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/modules")
include(KstMacros)
@@ -40,10 +39,18 @@
kst_option(bool OFF all python "Install Python support")
kst_option(bool OFF all python_build "Download and build NumPy/SciPy then install Python support")
kst_option(string "" all python_prefix "Path for installing python bindings")
+kst_option(string OFF all cross "Cross-compile on Linux for Windows")
message(STATUS)
+if(kst_cross)
+ include(KstCrossCompile)
+endif()
+
+project(Kst)
+
+
if(kst_release)
set(CMAKE_BUILD_TYPE Release)
else()
@@ -262,7 +269,11 @@
# http://cmake.org/cmake/help/cmake-2-8-docs.html#module:CPack
if(WIN32)
- set(CPACK_GENERATOR NSIS ZIP)
+ if(kst_cross)
+ set(CPACK_GENERATOR ZIP)
+ else()
+ set(CPACK_GENERATOR NSIS)
+ endif()
set(CPACK_BINARY_ZIP 1)
endif()
--- branches/work/kst/portto4/kst/cmake/misc/CMakeLists.txt #1308059:1308060
@@ -21,7 +21,7 @@
CONFIGURATIONS Debug)
endif()
-if(MINGW)
+if(MINGW AND NOT kst_cross)
get_filename_component(MINGW_BIN_PATH ${CMAKE_CXX_COMPILER} PATH)
if(EXISTS ${MINGW_BIN_PATH}/libgcc_s_sjlj-1.dll)
list(APPEND runtime ${MINGW_BIN_PATH}/libgcc_s_sjlj-1.dll)
--- branches/work/kst/portto4/kst/cmake/src/kst/CMakeLists.txt #1308059:1308060
@@ -7,7 +7,7 @@
if(WIN32)
if(MINGW)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/kst_icon.o
- COMMAND windres.exe -I${CMAKE_CURRENT_BINARY_DIR}
+ COMMAND ${CMAKE_RC_COMPILER} -I${CMAKE_CURRENT_BINARY_DIR}
-i${kst_dir}/src/kst/kst_icon.rc
-o ${CMAKE_CURRENT_BINARY_DIR}/kst_icon.o)
set(rc_file ${CMAKE_CURRENT_BINARY_DIR}/kst_icon.o)
More information about the Kst
mailing list