Add new test for waiting on pending calls in threads
[platform/upstream/dbus.git] / cmake / dbus / CMakeLists.txt
index 452a9e3..8a01d91 100644 (file)
@@ -22,7 +22,9 @@ set (dbusinclude_HEADERS
        ${DBUS_DIR}/dbus-syntax.h
        ${DBUS_DIR}/dbus-threads.h
        ${DBUS_DIR}/dbus-types.h
-       dbus-arch-deps.h
+)
+set (dbusinclude_ARCH_HEADERS
+       ${CMAKE_CURRENT_BINARY_DIR}/dbus-arch-deps.h
 )
 
 ### source code that goes in the installed client library
@@ -238,15 +240,12 @@ set(libdbus_HEADERS
        ${DBUS_LIB_HEADERS}
        ${DBUS_SHARED_HEADERS}
 )
-if (MSVC)
-    set (BUILD_FILEVERSION ${DBUS_MAJOR_VERSION},${DBUS_MINOR_VERSION},${DBUS_MICRO_VERSION},${DBUS_PATCH_VERSION})
-    set (BUILD_TIMESTAMP ${DBUS_BUILD_TIMESTAMP})
-    
-    configure_file(${DBUS_DIR}/versioninfo.rc.in ${CMAKE_CURRENT_BINARY_DIR}/versioninfo.rc)
-    file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/afxres.h "")
-    list(APPEND libdbus_SOURCES versioninfo.rc)
-    set_source_files_properties(versioninfo.rc COMPILE_FLAGS "-D__LINE__=1")
-endif (MSVC)
+
+set (BUILD_FILEVERSION ${DBUS_MAJOR_VERSION},${DBUS_MINOR_VERSION},${DBUS_MICRO_VERSION},${DBUS_PATCH_VERSION})
+set (BUILD_TIMESTAMP ${DBUS_BUILD_TIMESTAMP})
+
+configure_file(${DBUS_DIR}/versioninfo.rc.in ${CMAKE_CURRENT_BINARY_DIR}/versioninfo.rc)
+list(APPEND libdbus_SOURCES versioninfo.rc)
 
 if(MSVC_IDE)
        project_source_group(${GROUP_CODE} DBUS_LIB_SOURCES DBUS_LIB_HEADERS)
@@ -257,6 +256,9 @@ endif(MSVC_IDE)
 # for clock_getres() on e.g. GNU/Linux (but not Android)
 find_library(LIBRT rt)
 
+# for socket() on QNX
+find_library(LIBSOCKET socket)
+
 ### Client library
 add_library(dbus-1 SHARED
                        ${libdbus_SOURCES}
@@ -288,6 +290,9 @@ else(WIN32)
     if(LIBRT)
         target_link_libraries(dbus-1 ${LIBRT})
     endif()
+    if(LIBSOCKET)
+        target_link_libraries(dbus-1 ${LIBSOCKET})
+    endif()
 endif(WIN32)
 
 # Assume that Linux has -Wl,--version-script and other platforms do not
@@ -298,7 +303,8 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
 endif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
 
 install(TARGETS dbus-1 ${INSTALL_TARGETS_DEFAULT_ARGS})
-install_files(/include/dbus FILES ${dbusinclude_HEADERS})
+install(FILES ${dbusinclude_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dbus-1.0/dbus)
+install(FILES ${dbusinclude_ARCH_HEADERS} DESTINATION ${CMAKE_INSTALL_LIBDIR}/dbus-1.0/include/dbus)
 
 ### Internal library, used for the daemon, tools and tests, compiled statically.
 
@@ -318,6 +324,9 @@ else(WIN32)
     if(LIBRT)
         target_link_libraries(dbus-internal ${LIBRT})
     endif()
+    if(LIBSOCKET)
+        target_link_libraries(dbus-internal ${LIBSOCKET})
+    endif()
 endif(WIN32)
 
 if (DBUS_ENABLE_EMBEDDED_TESTS)