uci: copy permisions of /etc/config/ files for temp files
[project/uci.git] / CMakeLists.txt
index 882fd6a..2a72012 100644 (file)
@@ -2,8 +2,7 @@ cmake_minimum_required(VERSION 2.6)
 
 PROJECT(uci C)
 
-SET(CMAKE_INSTALL_PREFIX /usr)
-
+SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
 ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -I. -DUCI_PREFIX="${CMAKE_INSTALL_PREFIX}")
 
 OPTION(UCI_DEBUG "debugging support" OFF)
@@ -12,6 +11,8 @@ OPTION(BUILD_LUA "build Lua binding" ON)
 
 CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/uci_config.h.in ${CMAKE_SOURCE_DIR}/uci_config.h )
 
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
+
 SET(LIB_SOURCES libuci.c file.c util.c delta.c parse.c)
 
 ADD_LIBRARY(uci SHARED ${LIB_SOURCES})