projects
/
project
/
firewall3.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a93d954
)
Pass -Wl,--whole-archive and -Wl,--no-whole-archive during linking to avoid duplicate...
author
Jo-Philipp Wich
<jow@openwrt.org>
Fri, 24 May 2013 11:48:52 +0000
(13:48 +0200)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Fri, 24 May 2013 12:47:11 +0000
(14:47 +0200)
CMakeLists.txt
patch
|
blob
|
history
diff --git
a/CMakeLists.txt
b/CMakeLists.txt
index
e5d2dc3
..
1998190
100644
(file)
--- a/
CMakeLists.txt
+++ b/
CMakeLists.txt
@@
-10,8
+10,17
@@
IF(APPLE)
LINK_DIRECTORIES(/opt/local/lib)
ENDIF()
LINK_DIRECTORIES(/opt/local/lib)
ENDIF()
+ADD_LIBRARY(ext STATIC IMPORTED)
+SET_PROPERTY(TARGET ext PROPERTY IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/libext.a)
+
+ADD_LIBRARY(ext4 STATIC IMPORTED)
+SET_PROPERTY(TARGET ext4 PROPERTY IMPORTED_LOCATION "${CMAKE_SOURCE_DIR}/libext4.a")
+
+ADD_LIBRARY(ext6 STATIC IMPORTED)
+SET_PROPERTY(TARGET ext6 PROPERTY IMPORTED_LOCATION "${CMAKE_SOURCE_DIR}/libext6.a")
+
ADD_EXECUTABLE(firewall3 main.c options.c defaults.c zones.c forwards.c rules.c redirects.c utils.c ubus.c ipsets.c includes.c iptables.c)
ADD_EXECUTABLE(firewall3 main.c options.c defaults.c zones.c forwards.c rules.c redirects.c utils.c ubus.c ipsets.c includes.c iptables.c)
-TARGET_LINK_LIBRARIES(firewall3 uci ubox ubus ip4tc ip6tc xtables m
${CMAKE_SOURCE_DIR}/libext.a ${CMAKE_SOURCE_DIR}/libext4.a ${CMAKE_SOURCE_DIR}/libext6.a
)
+TARGET_LINK_LIBRARIES(firewall3 uci ubox ubus ip4tc ip6tc xtables m
-Wl,--whole-archive ext ext4 ext6 -Wl,--no-whole-archive
)
SET(CMAKE_INSTALL_PREFIX /usr)
SET(CMAKE_INSTALL_PREFIX /usr)