From: José Bollo Date: Mon, 20 Nov 2017 14:00:08 +0000 (+0000) Subject: Merge "Fix build for native package" X-Git-Tag: 4.99.3~1 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;h=e1b255b4c6486b0d2df5cd8b2aad8b817876ddf2;hp=-c;p=src%2Fapp-framework-binder.git Merge "Fix build for native package" --- e1b255b4c6486b0d2df5cd8b2aad8b817876ddf2 diff --combined src/CMakeLists.txt index 338f1cef,a7d1ff95..b8accc77 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@@ -16,17 -16,15 +16,19 @@@ # limitations under the License. ########################################################################### - if (CMAKE_C_COMPILER_VERSION VERSION_LESS 4.9) - message(FATAL_ERROR "Require at least gcc-4.9") - endif(CMAKE_C_COMPILER_VERSION VERSION_LESS 4.9) + if (NOT DEFINED ALLOW_NO_BINDER) + if (CMAKE_C_COMPILER_VERSION VERSION_LESS 4.9) + message(FATAL_ERROR "Require at least gcc-4.9") + endif(CMAKE_C_COMPILER_VERSION VERSION_LESS 4.9) + endif(ALLOW_NO_BINDER) INCLUDE(FindPkgConfig) ADD_SUBDIRECTORY(genskel) + +IF(WITH_BINDER) +########################################### + ADD_SUBDIRECTORY(tests) ADD_DEFINITIONS(-DBINDING_INSTALL_DIR="${binding_install_dir}") @@@ -93,14 -91,13 +95,14 @@@ INSTALL(TARGETS afb-daemo ########################################### # build and install libafbwsc ########################################### -ADD_LIBRARY(afbwsc SHARED afb-ws.c afb-ws-client.c afb-wsj1.c websock.c afb-proto-ws.c) +ADD_LIBRARY(afbwsc SHARED afb-ws.c afb-ws-client.c afb-wsj1.c websock.c afb-proto-ws.c jobs-fake.c) SET_TARGET_PROPERTIES(afbwsc PROPERTIES VERSION ${LIBAFBWSC_VERSION} SOVERSION ${LIBAFBWSC_SOVERSION}) TARGET_LINK_LIBRARIES(afbwsc ${libsystemd_LDFLAGS} ${json-c_LDFLAGS} + -lpthread -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/export-afbwsc.map -Wl,--as-needed -Wl,--gc-sections @@@ -120,7 -117,4 +122,7 @@@ TARGET_LINK_LIBRARIES(afb-client-dem INSTALL(TARGETS afb-client-demo RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - +########################################### +ELSE(WITH_BINDER) + MESSAGE(WARNING "NOT compiling the binder! but tools are compiled") +ENDIF(WITH_BINDER)