build: fix handling of string options
authorJo-Philipp Wich <jo@mein.io>
Sat, 18 Feb 2017 12:32:45 +0000 (13:32 +0100)
committerJo-Philipp Wich <jo@mein.io>
Sat, 18 Feb 2017 12:32:45 +0000 (13:32 +0100)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
CMakeLists.txt

index b99b58e871d888e48229ea457afeda09489492ac..e657f54c32e77497f837d2a69fae1fb3a9821bb3 100644 (file)
@@ -2,10 +2,11 @@ cmake_minimum_required(VERSION 2.6)
 
 PROJECT(opkg C)
 
-OPTION(HOST_CPU "Override Host CPU")
-OPTION(BUILD_CPU "Override Host CPU")
-OPTION(LOCK_FILE "Override lock file path" /var/lock/opkg.lock)
-OPTION(STATIC_UBOX "Statically link libubox")
+SET(HOST_CPU "" CACHE STRING "Override Host CPU")
+SET(BUILD_CPU "" CACHE STRING "Override Host CPU")
+SET(LOCK_FILE "/var/lock/opkg.lock" CACHE STRING "Override lock file path")
+
+OPTION(STATIC_UBOX "Statically link libubox" OFF)
 OPTION(BUILD_TESTS "Build test programs" ON)
 
 IF(NOT HOST_CPU)