Fix build for native package
[src/app-framework-binder.git] / src / CMakeLists.txt
index ade02a1..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)
 
@@ -89,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})
@@ -101,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