set(DBUS_1 dbus-1)
endif(splitlib AND MSVC)
+if (DBUS_BUILD_TESTS)
+ # set variables used for the .in files (substituted by configure_file) in test/data:
+ set(TEST_VALID_SERVICE_DIR ${CMAKE_BINARY_DIR}/test/data/valid-service-files)
+ set(TEST_VALID_SERVICE_SYSTEM_DIR ${CMAKE_BINARY_DIR}/test/data/valid-service-files-system)
+# TODO: TEST_SOCKET_DIR
+# TODO: TEST_LAUNCH_HELPER_BINARY
+endif (DBUS_BUILD_TESTS)
+
########### subdirs ###############
add_subdirectory( dbus )
ENDFOREACH(DIR)
ENDFOREACH(FILE_TYPE)
+
### generate test files
SET (CONFIG_FILES test/data/valid-config-files)
configure_file(${CMAKE_SOURCE_DIR}/${CONFIG_FILES}/debug-allow-all-sha1.conf.cmake ${CMAKE_BINARY_DIR}/${CONFIG_FILES}/debug-allow-all-sha1.conf )
configure_file(${CMAKE_SOURCE_DIR}/${CONFIG_FILES}/debug-allow-all.conf.cmake ${CMAKE_BINARY_DIR}/${CONFIG_FILES}/debug-allow-all.conf )
+FOREACH(FILE_TYPE *.conf.in *.service.in)
+ FOREACH(DIR ${TESTDIRS})
+ FILE(GLOB FILES "${CMAKE_SOURCE_DIR}/../${DIR}/${FILE_TYPE}" )
+ FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/${DIR})
+ FOREACH(FILE ${FILES})
+ GET_FILENAME_COMPONENT(FILENAME ${FILE} NAME)
+ STRING(REGEX REPLACE "\\.in$" "" FILENAME ${FILENAME})
+ SET (TARGET ${CMAKE_BINARY_DIR}/${DIR}/${FILENAME})
+ configure_file(${FILE} ${TARGET} @ONLY IMMEDIATE)
+ IF (CONFIG_VERBOSE)
+ MESSAGE("FROM: ${FILE}\nTO: ${TARGET}\n")
+ ENDIF (CONFIG_VERBOSE)
+ ENDFOREACH(FILE)
+ ENDFOREACH(DIR)
+ENDFOREACH(FILE_TYPE)
+
+
+
# (rh) disabled copying because bus-test could not parse this files for unknown reasons
FILE(GLOB FILES "${CMAKE_BINARY_DIR}/bus/*.conf" )
FOREACH(FILE ${FILES})