projects
/
project
/
uci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4a7d805
)
lua: use pkg-config to find the correct lua cflags
author
Felix Fietkau
<nbd@openwrt.org>
Thu, 15 Sep 2011 14:39:05 +0000
(16:39 +0200)
committer
Felix Fietkau
<nbd@openwrt.org>
Thu, 15 Sep 2011 14:39:05 +0000
(16:39 +0200)
lua/CMakeLists.txt
patch
|
blob
|
history
diff --git
a/lua/CMakeLists.txt
b/lua/CMakeLists.txt
index a532fc1e546a9b7bd3a03225420338297f7be9a1..7edfd0a00133a0d8b34b8ced55e768a3bb77d30f 100644
(file)
--- a/
lua/CMakeLists.txt
+++ b/
lua/CMakeLists.txt
@@
-4,7
+4,16
@@
PROJECT(uci C)
SET(CMAKE_INSTALL_PREFIX /)
-ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -I..)
+FIND_PROGRAM(PKG_CONFIG pkg-config)
+IF(PKG_CONFIG)
+ EXECUTE_PROCESS(
+ COMMAND pkg-config --silence-errors --cflags lua5.1
+ OUTPUT_VARIABLE LUA_CFLAGS
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+ENDIF()
+
+ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -I.. ${LUA_CFLAGS})
LINK_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/..)
IF(APPLE)