summaryrefslogtreecommitdiff
path: root/net/sems/files/patch-core-CMakeLists.txt
blob: fe1da3a5aa95dcda900cd181b9925b168f80e32e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--- core/CMakeLists.txt.orig	2020-05-10 08:28:35.425963000 -0700
+++ core/CMakeLists.txt	2020-05-10 08:32:38.193983000 -0700
@@ -13,22 +13,12 @@
 INCLUDE_DIRECTORIES (ampi)
 INCLUDE_DIRECTORIES (amci)
 
-ADD_LIBRARY (sems_core STATIC ${sems_core_SRCS})
-ADD_LIBRARY (sems_sip STATIC ${sems_sip_SRCS})
+ADD_EXECUTABLE (sems sems.cpp ${sems_core_SRCS} ${sems_sip_SRCS})
+ADD_EXECUTABLE(sems_tests ${sems_tests_SRCS} ${sems_core_SRCS} ${sems_sip_SRCS})
 
-ADD_EXECUTABLE (sems sems.cpp)
-ADD_EXECUTABLE(sems_tests ${sems_tests_SRCS})
-
 FOREACH (EXE_TARGET sems sems_tests)
 
-	# This allows symbols defined in the SIP stack but not used
-	# by the core itself to be included in the executable and
-	# thus be available for modules
-	IF(APPLE)
-		TARGET_LINK_LIBRARIES(${EXE_TARGET} ${CMAKE_DL_LIBS} -Wl,-force_load sems_core -Wl,-force_load sems_sip event event_pthreads -rdynamic)
-	ELSE()
-		TARGET_LINK_LIBRARIES(${EXE_TARGET} ${CMAKE_DL_LIBS} -Wl,--whole-archive sems_core sems_sip -Wl,--no-whole-archive event event_pthreads -rdynamic)
-	ENDIF()
+	TARGET_LINK_LIBRARIES(${EXE_TARGET} ${CMAKE_DL_LIBS} event event_pthreads -rdynamic)
 
 	IF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
 		TARGET_LINK_LIBRARIES(${EXE_TARGET} execinfo)