From efd7c8c4df2b922aa9691ba2b679147d6fb7a18f Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 31 Jan 2011 20:23:34 +0100 Subject: convert to cmake --- CMakeLists.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 CMakeLists.txt (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..e307cd7 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,21 @@ +cmake_minimum_required(VERSION 2.8) + +PROJECT(ubox C) +ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3) + +SET(SOURCES avl.c blob.c blobmsg.c hash.c uhtbl.c uloop.c) +IF("${CMAKE_SYSTEM}" MATCHES "Linux") + SET(SOURCES ${SOURCES} unl.c) +ENDIF("${CMAKE_SYSTEM}" MATCHES "Linux") + +ADD_LIBRARY(ubox SHARED ${SOURCES}) + +SET(CMAKE_INSTALL_PREFIX /usr) + +FILE(GLOB headers *.h) +INSTALL(FILES ${headers} + DESTINATION include/libubox +) +INSTALL(TARGETS ubox + LIBRARY DESTINATION lib +) -- cgit v1.2.3