File tree Expand file tree Collapse file tree 1 file changed +16
-5
lines changed
Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -89,14 +89,25 @@ if(PARSE_DEFAULT_ONLY)
8989endif ()
9090
9191webos_add_linker_options(ALL --version -script=${CMAKE_SOURCE_DIR} /src/PmLogLibExports.map)
92- webos_add_linker_options(ALL --no -undefined)
9392
9493add_library (PmLogLib SHARED src/PmLogLib.c)
9594
96- if (PARSE_DEFAULT_ONLY)
97- target_link_libraries (PmLogLib ${GLIB2_LDFLAGS} ${PBNJSON_C_LDFLAGS} ${NYXLIB_LDFLAGS} dl pthread)
98- else ()
99- target_link_libraries (PmLogLib ${GLIB2_LDFLAGS} ${PBNJSON_C_LDFLAGS} dl pthread)
95+ ### Targeet specific settings
96+ if (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" )
97+ # FreeBSD does not have explicit dl library
98+ if (PARSE_DEFAULT_ONLY)
99+ target_link_libraries (PmLogLib ${GLIB2_LDFLAGS} ${PBNJSON_C_LDFLAGS} ${NYXLIB_LDFLAGS} pthread)
100+ else ()
101+ target_link_libraries (PmLogLib ${GLIB2_LDFLAGS} ${PBNJSON_C_LDFLAGS} pthread)
102+ endif ()
103+ # XXX lack of --no-undefined linker option might be harmful?
104+ else () #Linux
105+ webos_add_linker_options(ALL --no -undefined)
106+ if (PARSE_DEFAULT_ONLY)
107+ target_link_libraries (PmLogLib ${GLIB2_LDFLAGS} ${PBNJSON_C_LDFLAGS} ${NYXLIB_LDFLAGS} dl pthread)
108+ else ()
109+ target_link_libraries (PmLogLib ${GLIB2_LDFLAGS} ${PBNJSON_C_LDFLAGS} dl pthread)
110+ endif ()
100111endif ()
101112
102113webos_build_library(NOHEADERS)
You can’t perform that action at this time.
0 commit comments