Fix build for native package
[src/app-framework-binder.git] / src / CMakeLists.txt
index 0e05f85..a7d1ff9 100644 (file)
 # 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)
 
@@ -36,6 +38,7 @@ ADD_LIBRARY(afb-lib STATIC
        afb-api-so.c
        afb-api-so-v1.c
        afb-api-so-v2.c
+       afb-api-so-vdyn.c
        afb-api-ws.c
        afb-apiset.c
        afb-auth.c
@@ -88,7 +91,7 @@ INSTALL(TARGETS afb-daemon
 ###########################################
 # build and install libafbwsc
 ###########################################
-ADD_LIBRARY(afbwsc SHARED afb-ws.c afb-ws-client.c afb-wsj1.c websock.c)
+ADD_LIBRARY(afbwsc SHARED afb-ws.c afb-ws-client.c afb-wsj1.c websock.c afb-proto-ws.c)
 SET_TARGET_PROPERTIES(afbwsc PROPERTIES
        VERSION ${LIBAFBWSC_VERSION}
        SOVERSION ${LIBAFBWSC_SOVERSION})
@@ -100,7 +103,7 @@ TARGET_LINK_LIBRARIES(afbwsc
        -Wl,--gc-sections
 )
 INSTALL(TARGETS afbwsc LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
-INSTALL(FILES afb-wsj1.h afb-ws-client.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/afb)
+INSTALL(FILES afb-wsj1.h afb-ws-client.h afb-proto-ws.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/afb)
 
 ###########################################
 # build and install afb-client-demo