From dff49fbaba5f7a56b6119bdb9fbfc3f8d3787084 Mon Sep 17 00:00:00 2001 From: NicJA Date: Sun, 22 Feb 2015 02:38:51 +0000 Subject: [PATCH] add cmake helper (use with cmake ... -DCMAKE_TOOLCHAIN_FILE=$(GENDIR)/config/conf.cmake) git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@50102 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- config/conf.cmake.in | 14 ++++++++++++++ configure | 5 +++++ configure.in | 3 +++ 3 files changed, 22 insertions(+) create mode 100644 config/conf.cmake.in diff --git a/config/conf.cmake.in b/config/conf.cmake.in new file mode 100644 index 0000000000..f9e35a7e2a --- /dev/null +++ b/config/conf.cmake.in @@ -0,0 +1,14 @@ +set(CMAKE_SYSTEM_NAME AROS) +set(BUILD_SHARED_LIBS OFF) +set(LIBTYPE STATIC) +set(CMAKE_BUILD_TYPE Release) +set(CMAKE_FIND_ROOT_PATH @AROS_BUILDDIR@/bin/@aros_target_arch@-@aros_target_cpu@@aros_target_suffix@/AROS/Development) +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_C_COMPILER @aros_target_cc@) +set(CMAKE_CXX_COMPILER @aros_target_cxx@) +set(CMAKE_MODULE_PATH "@SRCDIR@/config/cmake" ${CMAKE_MODULE_PATH}) # For mxe FindPackage scripts +set(CMAKE_BUILD_TYPE Release CACHE STRING "Debug|Release|RelWithDebInfo|MinSizeRel") +set(CMAKE_CROSS_COMPILING ON) # Workaround for http://www.cmake.org/Bug/view.php?id=14075 +# set(PKG_CONFIG_EXECUTABLE ) diff --git a/configure b/configure index 880956ee78..08492388a4 100755 --- a/configure +++ b/configure @@ -14729,6 +14729,10 @@ if test "$aros_target_variant" == "android"; then fi +# cmake helper +ac_config_files="$ac_config_files ${aros_targetcfg_dir}/conf.cmake:config/conf.cmake.in" + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -15484,6 +15488,7 @@ do "${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}-aros-gcc") CONFIG_FILES="$CONFIG_FILES ${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}-aros-gcc:scripts/aros-gcc.in" ;; "${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}-aros-g++") CONFIG_FILES="$CONFIG_FILES ${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}-aros-g++:scripts/aros-g++.in" ;; "${aros_gendir}/arch/all-android/bootstrap/app/default.properties") CONFIG_FILES="$CONFIG_FILES ${aros_gendir}/arch/all-android/bootstrap/app/default.properties:arch/all-android/bootstrap/app/default.properties.in" ;; + "${aros_targetcfg_dir}/conf.cmake") CONFIG_FILES="$CONFIG_FILES ${aros_targetcfg_dir}/conf.cmake:config/conf.cmake.in" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac diff --git a/configure.in b/configure.in index 0eaceba71c..a1cd00cf96 100644 --- a/configure.in +++ b/configure.in @@ -2948,6 +2948,9 @@ if test "$aros_target_variant" == "android"; then AC_CONFIG_FILES(${aros_gendir}/arch/all-android/bootstrap/app/default.properties:arch/all-android/bootstrap/app/default.properties.in) fi +# cmake helper +AC_CONFIG_FILES(${aros_targetcfg_dir}/conf.cmake:config/conf.cmake.in) + AC_OUTPUT dnl This is in order to not define SHARED_CFLAGS sometimes -- 2.11.4.GIT