diff --git a/CMakeLists.txt b/CMakeLists.txt index c56e81af7..f23823bc6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,12 +31,10 @@ if(NOT COMMAND find_host_program) endmacro() endif() -option(RKPLATFORM "Enable RK HW CONFIG" OFF) -if(${CMAKE_RKPLATFORM_ENABLE} MATCHES "ON") - option(RKPLATFORM "Enable RK HW CONFIG" ON) - set(RKPLATFORM True) - add_definitions(-DRKPLATFORM) -endif() +set(RKPLATFORM "" CACHE BOOL "Enable RK HW CONFIG") +if (RKPLATFORM) + ADD_DEFINITIONS(-DRKPLATFORM) +endif(RKPLATFORM) project (rk_mpp) diff --git a/build/android/aarch64/make-Android.bash b/build/android/aarch64/make-Android.bash index 31eb7c334..cca588f2a 100755 --- a/build/android/aarch64/make-Android.bash +++ b/build/android/aarch64/make-Android.bash @@ -18,7 +18,7 @@ cmake -DCMAKE_TOOLCHAIN_FILE=../android.toolchain.cmake \ -DANDROID_TOOLCHAIN_NAME="aarch64-linux-android-4.9" \ -DANDROID_NATIVE_API_LEVEL=android-21 \ -DANDROID_STL=system \ - -DCMAKE_RKPLATFORM_ENABLE=ON \ + -DRKPLATFORM=ON \ ../../../ # ---------------------------------------------------------------------------- diff --git a/build/android/arm/make-Android.bash b/build/android/arm/make-Android.bash index 65076c3d7..abef572d1 100755 --- a/build/android/arm/make-Android.bash +++ b/build/android/arm/make-Android.bash @@ -18,7 +18,7 @@ cmake -DCMAKE_TOOLCHAIN_FILE=../android.toolchain.cmake \ -DANDROID_TOOLCHAIN_NAME="arm-linux-androideabi-4.8" \ -DANDROID_NATIVE_API_LEVEL=android-21 \ -DANDROID_STL=system \ - -DCMAKE_RKPLATFORM_ENABLE=ON \ + -DRKPLATFORM=ON \ ../../../ # ---------------------------------------------------------------------------- diff --git a/build/android/x86/make-Android.bash b/build/android/x86/make-Android.bash index 411fe7597..79ca63cfc 100755 --- a/build/android/x86/make-Android.bash +++ b/build/android/x86/make-Android.bash @@ -18,7 +18,7 @@ cmake -DCMAKE_TOOLCHAIN_FILE=../android.toolchain.cmake \ -DANDROID_TOOLCHAIN_NAME="x86-4.8" \ -DANDROID_NATIVE_API_LEVEL=android-21 \ -DANDROID_STL=system \ - -DCMAKE_RKPLATFORM_ENABLE=ON \ + -DRKPLATFORM=ON \ ../../../ # ---------------------------------------------------------------------------- diff --git a/build/linux/aarch64/make-Makefiles.bash b/build/linux/aarch64/make-Makefiles.bash index a06787721..115a065be 100755 --- a/build/linux/aarch64/make-Makefiles.bash +++ b/build/linux/aarch64/make-Makefiles.bash @@ -23,6 +23,6 @@ fi # generate Makefile cmake -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_TOOLCHAIN_FILE=./arm.linux.cross.cmake \ - -DCMAKE_RKPLATFORM_ENABLE=ON \ + -DRKPLATFORM=ON \ -G "Unix Makefiles" \ ${MPP_TOP} diff --git a/build/linux/arm/make-Makefiles.bash b/build/linux/arm/make-Makefiles.bash index 300988c2c..9dcbc7e89 100755 --- a/build/linux/arm/make-Makefiles.bash +++ b/build/linux/arm/make-Makefiles.bash @@ -23,6 +23,6 @@ fi # generate Makefile cmake -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_TOOLCHAIN_FILE=./arm.linux.cross.cmake \ - -DCMAKE_RKPLATFORM_ENABLE=ON \ + -DRKPLATFORM=ON \ -G "Unix Makefiles" \ ${MPP_TOP} diff --git a/build/linux/x86/sofia-3gr/make-Makefiles.bash b/build/linux/x86/sofia-3gr/make-Makefiles.bash index 14e5a9634..8a8f5e3f8 100755 --- a/build/linux/x86/sofia-3gr/make-Makefiles.bash +++ b/build/linux/x86/sofia-3gr/make-Makefiles.bash @@ -2,5 +2,5 @@ # Run this from within a bash shell cmake -G "Unix Makefiles" \ -DCMAKE_TOOLCHAIN_FILE=./sofia-3gr.linux.cross.cmake \ - -DCMAKE_RKPLATFORM_ENABLE=ON \ + -DRKPLATFORM=ON \ ../../../../ && ccmake ../../../../ diff --git a/build/linux/x86_64/make-Makefiles.bash b/build/linux/x86_64/make-Makefiles.bash index 9c8877d12..3d265baf5 100755 --- a/build/linux/x86_64/make-Makefiles.bash +++ b/build/linux/x86_64/make-Makefiles.bash @@ -3,5 +3,5 @@ # x86_64 is for simulation do not enable RK platform cmake -G "Unix Makefiles" \ -DCMAKE_BUILD_TYPE=debug \ - -DCMAKE_RKPLATFORM_ENABLE=OFF \ + -DRKPLATFORM=OFF \ ../../../ && ccmake ../../../ diff --git a/debian/rules b/debian/rules index 1e7426434..94048c8be 100755 --- a/debian/rules +++ b/debian/rules @@ -26,6 +26,6 @@ override_dh_auto_configure: dh_auto_configure -- \ -DCMAKE_TOOLCHAIN_FILE=/etc/dpkg-cross/cmake/CMakeCross.txt \ -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_RKPLATFORM_ENABLE=ON \ + -DRKPLATFORM=ON \ -DHAVE_DRM=ON \ -DARM_MIX_32_64=ON