Commit 7dd83ba8 authored by Ralf Habacker's avatar Ralf Habacker
Browse files

Replace tabs by 4 spaces in CMakeLists.txt files

parent 38b7c285
......@@ -27,7 +27,7 @@ autoinit(configure.ac)
autoversion(dbus)
if(EXISTS ${CMAKE_SOURCE_DIR}/config.h.in)
autoheaderchecks(${CMAKE_SOURCE_DIR}/config.h.in ${CMAKE_SOURCE_DIR}/cmake/ConfigureChecks.cmake ${CMAKE_SOURCE_DIR}/cmake/config.h.cmake)
autoheaderchecks(${CMAKE_SOURCE_DIR}/config.h.in ${CMAKE_SOURCE_DIR}/cmake/ConfigureChecks.cmake ${CMAKE_SOURCE_DIR}/cmake/config.h.cmake)
else()
message(STATUS "Generate config.h.in with autogen.sh to enable cmake header difference check.")
endif()
......@@ -53,16 +53,16 @@ set (BUILD_TIMESTAMP ${DBUS_BUILD_TIMESTAMP})
include(GNUInstallDirs)
if (DBUSDIR)
set(DBUS_INSTALL_DIR "${DBUSDIR}")
set(DBUS_INSTALL_DIR "${DBUSDIR}")
endif (DBUSDIR)
if ($ENV{DBUSDIR})
set(DBUS_INSTALL_DIR "$ENV{DBUSDIR}")
set(DBUS_INSTALL_DIR "$ENV{DBUSDIR}")
endif ($ENV{DBUSDIR})
if (DBUS_INSTALL_DIR)
set(CMAKE_INSTALL_PREFIX "${DBUS_INSTALL_DIR}" CACHE PATH "install prefix" FORCE)
set(CMAKE_INSTALL_PREFIX "${DBUS_INSTALL_DIR}" CACHE PATH "install prefix" FORCE)
else (DBUS_INSTALL_DIR)
set(DBUS_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}")
set(DBUS_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}")
endif (DBUS_INSTALL_DIR)
set(DBUS_PREFIX ${DBUS_INSTALL_DIR})
......@@ -118,14 +118,14 @@ endif (CYGWIN)
if (WIN32)
# include local header first to avoid using old installed header
set (CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${CMAKE_SOURCE_DIR}/..)
find_package(LibIconv)
find_package(LibIconv)
include(Win32Macros)
addExplorerWrapper(${CMAKE_PROJECT_NAME})
endif (WIN32)
if(NOT WIN32)
set (CMAKE_THREAD_PREFER_PTHREAD ON)
include (FindThreads)
set (CMAKE_THREAD_PREFER_PTHREAD ON)
include (FindThreads)
endif(NOT WIN32)
option (DBUS_DISABLE_ASSERT "Disable assertion checking" OFF)
......@@ -157,7 +157,7 @@ SET(DBUS_SOURCE_DIR ${CMAKE_SOURCE_DIR}/..)
include (MacroLibrary)
if(VCS)
set(DBUS_VERBOSE_C_S 1 CACHE STRING "verbose mode" FORCE)
set(DBUS_VERBOSE_C_S 1 CACHE STRING "verbose mode" FORCE)
endif(VCS)
if(MSVC)
......@@ -227,10 +227,10 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNINGS_CFLAGS}")
if (UNIX AND NOT DBUS_DISABLE_ASSERT)
# required for backtrace
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wl,--export-dynamic")
SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Wl,--export-dynamic")
add_definitions(-DDBUS_BUILT_R_DYNAMIC)
# required for backtrace
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wl,--export-dynamic")
SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Wl,--export-dynamic")
add_definitions(-DDBUS_BUILT_R_DYNAMIC)
endif (UNIX AND NOT DBUS_DISABLE_ASSERT)
if(DBUS_WITH_GLIB)
......@@ -309,8 +309,8 @@ endif(DBUS_BUILD_TESTS)
option (DBUS_USE_OUTPUT_DEBUG_STRING "enable win32 debug port for message output" OFF)
if(WIN32)
# win32 dbus service support - this support is not complete
option (DBUS_SERVICE "enable dbus service installer" OFF)
# win32 dbus service support - this support is not complete
option (DBUS_SERVICE "enable dbus service installer" OFF)
endif(WIN32)
option (DBUS_ENABLE_ANSI "enable -ansi -pedantic gcc flags" OFF)
......@@ -401,22 +401,22 @@ endif(WIN32)
if (MSVC_IDE)
if(CMAKE_BUILD_TYPE MATCHES Debug)
set(IDE_BIN /Debug )
message(STATUS)
message(STATUS "Visual Studio: test programs will only work with 'Debug' configuration!")
message(STATUS "To run tests with 'Release' configuration use -DCMAKE_BUILD_TYPE=Release")
message(STATUS "Add '..\\..\\test\\data' to the command line option of the test programs")
message(STATUS)
set(IDE_BIN /Debug )
message(STATUS)
message(STATUS "Visual Studio: test programs will only work with 'Debug' configuration!")
message(STATUS "To run tests with 'Release' configuration use -DCMAKE_BUILD_TYPE=Release")
message(STATUS "Add '..\\..\\test\\data' to the command line option of the test programs")
message(STATUS)
else(CMAKE_BUILD_TYPE MATCHES Debug)
set(IDE_BIN /Release)
message(STATUS)
message(STATUS "Visual Studio: test programs will only work with 'Release' configuration!")
message(STATUS "To run tests with 'Debug' configuration use -DCMAKE_BUILD_TYPE=Debug")
message(STATUS "Add '..\\..\\test\\data' to the command line option of the test programs")
message(STATUS)
set(IDE_BIN /Release)
message(STATUS)
message(STATUS "Visual Studio: test programs will only work with 'Release' configuration!")
message(STATUS "To run tests with 'Debug' configuration use -DCMAKE_BUILD_TYPE=Debug")
message(STATUS "Add '..\\..\\test\\data' to the command line option of the test programs")
message(STATUS)
endif(CMAKE_BUILD_TYPE MATCHES Debug)
set (TEST_PATH_FORCE FORCE)
FILE(REMOVE ${CMAKE_BINARY_DIR}/data/dbus-1/services)
set (TEST_PATH_FORCE FORCE)
FILE(REMOVE ${CMAKE_BINARY_DIR}/data/dbus-1/services)
endif (MSVC_IDE)
#### Find socket directories
......@@ -544,10 +544,10 @@ endif()
add_subdirectory( dbus )
add_subdirectory( bus )
if (DBUS_BUILD_TESTS)
add_subdirectory( test )
add_custom_target(check
COMMAND ctest -R ^test-.*
)
add_subdirectory( test )
add_custom_target(check
COMMAND ctest -R ^test-.*
)
endif (DBUS_BUILD_TESTS)
add_subdirectory( tools )
add_subdirectory( doc )
......
......@@ -17,12 +17,12 @@ endif()
SET (SERVICE_FILES test/data/valid-service-files)
FILE(GLOB FILES "${SERVICE_FILES}/*.service.in" )
FOREACH(FILE ${FILES})
GET_FILENAME_COMPONENT(FILENAME ${FILE} NAME_WE)
SET (TARGET ${CMAKE_BINARY_DIR}/data/dbus-1/services/${FILENAME}.service)
IF (CONFIG_VERBOSE)
MESSAGE("FROM: ${FILE}\nTO: ${TARGET}\n")
ENDIF (CONFIG_VERBOSE)
configure_file(${FILE} ${TARGET} )
GET_FILENAME_COMPONENT(FILENAME ${FILE} NAME_WE)
SET (TARGET ${CMAKE_BINARY_DIR}/data/dbus-1/services/${FILENAME}.service)
IF (CONFIG_VERBOSE)
MESSAGE("FROM: ${FILE}\nTO: ${TARGET}\n")
ENDIF (CONFIG_VERBOSE)
configure_file(${FILE} ${TARGET} )
ENDFOREACH(FILE)
......@@ -35,58 +35,58 @@ else (DBUS_BUS_ENABLE_INOTIFY)
endif (DBUS_BUS_ENABLE_INOTIFY)
set (BUS_SOURCES
activation.c
activation.h
apparmor.c
apparmor.h
audit.c
audit.h
bus.c
bus.h
config-loader-expat.c
config-parser.c
config-parser.h
config-parser-common.c
config-parser-common.h
activation.c
activation.h
apparmor.c
apparmor.h
audit.c
audit.h
bus.c
bus.h
config-loader-expat.c
config-parser.c
config-parser.h
config-parser-common.c
config-parser-common.h
# config-parser-trivial.c
connection.c
connection.h
containers.c
containers.h
desktop-file.c
desktop-file.h
dir-watch.h
dispatch.c
dispatch.h
driver.c
driver.h
expirelist.c
expirelist.h
policy.c
policy.h
selinux.h
selinux.c
services.c
services.h
signals.c
signals.h
test.c
test.h
utils.c
utils.h
${DIR_WATCH_SOURCE}
connection.c
connection.h
containers.c
containers.h
desktop-file.c
desktop-file.h
dir-watch.h
dispatch.c
dispatch.h
driver.c
driver.h
expirelist.c
expirelist.h
policy.c
policy.h
selinux.h
selinux.c
services.c
services.h
signals.c
signals.h
test.c
test.h
utils.c
utils.h
${DIR_WATCH_SOURCE}
)
if(DBUS_ENABLE_STATS)
list(APPEND BUS_SOURCES
stats.c
stats.h
)
list(APPEND BUS_SOURCES
stats.c
stats.h
)
endif(DBUS_ENABLE_STATS)
include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}/..
${EXPAT_INCLUDE_DIR}
${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}/..
${EXPAT_INCLUDE_DIR}
)
if(WIN32)
......@@ -116,18 +116,18 @@ if(NOT WIN32)
endif()
if (DBUS_SERVICE)
set (dbus_service_SOURCES
bus-service-win.c
# TODO: add additional files
# service-main.c
# ${BUS_SOURCES}
)
add_executable_version_info(dbus_service_SOURCES "dbus-service")
add_executable(dbus-service ${dbus_service_SOURCES} )
target_link_libraries(dbus-service ${DBUS_INTERNAL_LIBRARIES} ${EXPAT_LIBRARIES})
set_target_properties(dbus-service PROPERTIES COMPILE_FLAGS ${DBUS_INTERNAL_CLIENT_DEFINITIONS})
install(TARGETS dbus-service ${INSTALL_TARGETS_DEFAULT_ARGS})
set (dbus_service_SOURCES
bus-service-win.c
# TODO: add additional files
# service-main.c
# ${BUS_SOURCES}
)
add_executable_version_info(dbus_service_SOURCES "dbus-service")
add_executable(dbus-service ${dbus_service_SOURCES} )
target_link_libraries(dbus-service ${DBUS_INTERNAL_LIBRARIES} ${EXPAT_LIBRARIES})
set_target_properties(dbus-service PROPERTIES COMPILE_FLAGS ${DBUS_INTERNAL_CLIENT_DEFINITIONS})
install(TARGETS dbus-service ${INSTALL_TARGETS_DEFAULT_ARGS})
endif (DBUS_SERVICE)
set(LAUNCH_HELPER_SOURCES
......@@ -139,15 +139,15 @@ set(LAUNCH_HELPER_SOURCES
)
if(NOT WIN32)
add_library(launch-helper-internal STATIC ${LAUNCH_HELPER_SOURCES})
target_link_libraries(launch-helper-internal ${DBUS_INTERNAL_LIBRARIES} ${EXPAT_LIBRARIES})
add_library(launch-helper-internal STATIC ${LAUNCH_HELPER_SOURCES})
target_link_libraries(launch-helper-internal ${DBUS_INTERNAL_LIBRARIES} ${EXPAT_LIBRARIES})
add_executable(dbus-daemon-launch-helper activation-helper.c activation-helper-bin.c )
target_link_libraries(dbus-daemon-launch-helper launch-helper-internal)
add_executable(dbus-daemon-launch-helper activation-helper.c activation-helper-bin.c )
target_link_libraries(dbus-daemon-launch-helper launch-helper-internal)
endif(NOT WIN32)
if(MSVC)
project_source_group(${GROUP_CODE} bus_test_SOURCES dummy)
project_source_group(${GROUP_CODE} bus_test_SOURCES dummy)
endif(MSVC)
## mop up the gcov files
......
......@@ -3,109 +3,109 @@ configure_file(dbus-arch-deps.h.in ${CMAKE_CURRENT_BINARY_DIR}/dbus-arch-deps.h
add_definitions(-DDBUS_COMPILATION)
set (dbusinclude_HEADERS
dbus.h
dbus-address.h
dbus-bus.h
dbus-connection.h
dbus-errors.h
dbus-macros.h
dbus-memory.h
dbus-message.h
dbus-misc.h
dbus-pending-call.h
dbus-protocol.h
dbus-server.h
dbus-shared.h
dbus-signature.h
dbus-syntax.h
dbus-threads.h
dbus-types.h
dbus.h
dbus-address.h
dbus-bus.h
dbus-connection.h
dbus-errors.h
dbus-macros.h
dbus-memory.h
dbus-message.h
dbus-misc.h
dbus-pending-call.h
dbus-protocol.h
dbus-server.h
dbus-shared.h
dbus-signature.h
dbus-syntax.h
dbus-threads.h
dbus-types.h
)
set (dbusinclude_ARCH_HEADERS
${CMAKE_CURRENT_BINARY_DIR}/dbus-arch-deps.h
${CMAKE_CURRENT_BINARY_DIR}/dbus-arch-deps.h
)
### source code that goes in the installed client library
### and is specific to library functionality
set (DBUS_LIB_SOURCES
dbus-address.c
dbus-auth.c
dbus-bus.c
dbus-connection.c
dbus-credentials.c
dbus-errors.c
dbus-keyring.c
dbus-marshal-header.c
dbus-marshal-byteswap.c
dbus-marshal-recursive.c
dbus-marshal-validate.c
dbus-message.c
dbus-misc.c
dbus-nonce.c
dbus-object-tree.c
dbus-pending-call.c
dbus-resources.c
dbus-server.c
dbus-server-socket.c
dbus-server-debug-pipe.c
dbus-sha.c
dbus-signature.c
dbus-syntax.c
dbus-timeout.c
dbus-threads.c
dbus-transport.c
dbus-transport-socket.c
dbus-watch.c
dbus-address.c
dbus-auth.c
dbus-bus.c
dbus-connection.c
dbus-credentials.c
dbus-errors.c
dbus-keyring.c
dbus-marshal-header.c
dbus-marshal-byteswap.c
dbus-marshal-recursive.c
dbus-marshal-validate.c
dbus-message.c
dbus-misc.c
dbus-nonce.c
dbus-object-tree.c
dbus-pending-call.c
dbus-resources.c
dbus-server.c
dbus-server-socket.c
dbus-server-debug-pipe.c
dbus-sha.c
dbus-signature.c
dbus-syntax.c
dbus-timeout.c
dbus-threads.c
dbus-transport.c
dbus-transport-socket.c
dbus-watch.c
)
if(UNIX)
set (DBUS_LIB_SOURCES ${DBUS_LIB_SOURCES}
dbus-transport-unix.c
dbus-server-unix.c
)
set (DBUS_LIB_SOURCES ${DBUS_LIB_SOURCES}
dbus-transport-unix.c
dbus-server-unix.c
)
else(UNIX)
set (DBUS_LIB_SOURCES ${DBUS_LIB_SOURCES}
dbus-transport-win.c
dbus-server-win.c
)
set (DBUS_LIB_SOURCES ${DBUS_LIB_SOURCES}
dbus-transport-win.c
dbus-server-win.c
)
endif(UNIX)
set (DBUS_LIB_HEADERS
dbus-auth.h
dbus-connection-internal.h
dbus-credentials.h
dbus-keyring.h
dbus-marshal-header.h
dbus-marshal-byteswap.h
dbus-marshal-recursive.h
dbus-marshal-validate.h
dbus-message-internal.h
dbus-message-private.h
dbus-misc.h
dbus-object-tree.h
dbus-protocol.h
dbus-resources.h
dbus-server-debug-pipe.h
dbus-server-protected.h
dbus-server-unix.h
dbus-sha.h
dbus-timeout.h
dbus-threads.h
dbus-threads-internal.h
dbus-transport.h
dbus-transport-protected.h
dbus-watch.h
${CMAKE_BINARY_DIR}/config.h
dbus-auth.h
dbus-connection-internal.h
dbus-credentials.h
dbus-keyring.h
dbus-marshal-header.h
dbus-marshal-byteswap.h
dbus-marshal-recursive.h
dbus-marshal-validate.h
dbus-message-internal.h
dbus-message-private.h
dbus-misc.h
dbus-object-tree.h
dbus-protocol.h
dbus-resources.h
dbus-server-debug-pipe.h
dbus-server-protected.h
dbus-server-unix.h
dbus-sha.h
dbus-timeout.h
dbus-threads.h
dbus-threads-internal.h
dbus-transport.h
dbus-transport-protected.h
dbus-watch.h
${CMAKE_BINARY_DIR}/config.h
)
if(UNIX)
set (DBUS_LIB_HEADERS ${DBUS_LIB_HEADERS}
dbus-transport-unix.h
)
set (DBUS_LIB_HEADERS ${DBUS_LIB_HEADERS}
dbus-transport-unix.h
)
else(UNIX)
set (DBUS_LIB_HEADERS ${DBUS_LIB_HEADERS}
dbus-transport-win.h
)
set (DBUS_LIB_HEADERS ${DBUS_LIB_HEADERS}
dbus-transport-win.h
)
endif(UNIX)
......@@ -114,33 +114,33 @@ endif(UNIX)
### daemon or test programs (all symbols in here should
### be underscore-prefixed)
set (DBUS_SHARED_SOURCES
dbus-dataslot.c
dbus-file.c
dbus-hash.c
dbus-internals.c
dbus-list.c
dbus-marshal-basic.c
dbus-memory.c
dbus-mempool.c
dbus-string.c
dbus-sysdeps.c
dbus-pipe.c
dbus-test-tap.c
dbus-dataslot.c
dbus-file.c
dbus-hash.c
dbus-internals.c
dbus-list.c
dbus-marshal-basic.c
dbus-memory.c
dbus-mempool.c
dbus-string.c
dbus-sysdeps.c
dbus-pipe.c
dbus-test-tap.c
)
set (DBUS_SHARED_HEADERS
dbus-dataslot.h
dbus-file.h
dbus-hash.h
dbus-internals.h
dbus-list.h
dbus-marshal-basic.h
dbus-mempool.h
dbus-string.h
dbus-string-private.h
dbus-pipe.h
dbus-sysdeps.h
dbus-test-tap.h
dbus-dataslot.h
dbus-file.h
dbus-hash.h
dbus-internals.h
dbus-list.h
dbus-marshal-basic.h
dbus-mempool.h
dbus-string.h
dbus-string-private.h
dbus-pipe.h
dbus-sysdeps.h
dbus-test-tap.h
)
### source code that is generic utility functionality used
......@@ -149,69 +149,69 @@ set (DBUS_SHARED_HEADERS
### should be underscore-prefixed but don't really need
### to be unless they move to DBUS_SHARED_SOURCES later)
set (DBUS_UTIL_SOURCES
dbus-asv-util.c
dbus-mainloop.c
dbus-message-util.c
dbus-shell.c
dbus-pollable-set.c
dbus-pollable-set-poll.c
dbus-string-util.c
dbus-sysdeps-util.c
dbus-asv-util.c
dbus-mainloop.c
dbus-message-util.c
dbus-shell.c
dbus-pollable-set.c
dbus-pollable-set-poll.c
dbus-string-util.c
dbus-sysdeps-util.c
)
set (DBUS_UTIL_HEADERS
dbus-asv-util.h
dbus-mainloop.h
dbus-shell.h
dbus-pollable-set.h
dbus-spawn.h
dbus-test.h
dbus-asv-util.h
dbus-mainloop.h
dbus-shell.h
dbus-pollable-set.h
dbus-spawn.h
dbus-test.h
)
### platform specific settings
if (WIN32)
set (DBUS_SHARED_SOURCES ${DBUS_SHARED_SOURCES}
dbus-file-win.c
dbus-init-win.cpp
dbus-sysdeps-win.c
dbus-pipe-win.c
dbus-sysdeps-thread-win.c
)
set (DBUS_SHARED_HEADERS ${DBUS_SHARED_HEADERS}
dbus-sockets-win.h
dbus-sysdeps-win.h
)
set (DBUS_UTIL_SOURCES ${DBUS_UTIL_SOURCES}
dbus-spawn-win.c
dbus-sysdeps-util-win.c
)
if(WINCE)
set (DBUS_SHARED_SOURCES ${DBUS_SHARED_SOURCES}
dbus-sysdeps-wince-glue.c
)
set (DBUS_SHARED_HEADERS ${DBUS_SHARED_HEADERS}
dbus-sysdeps-wince-glue.h
)
endif(WINCE)
set (DBUS_SHARED_SOURCES ${DBUS_SHARED_SOURCES}
dbus-file-win.c
dbus-init-win.cpp
dbus-sysdeps-win.c
dbus-pipe-win.c
dbus-sysdeps-thread-win.c
)
set (DBUS_SHARED_HEADERS ${DBUS_SHARED_HEADERS}
dbus-sockets-win.h
dbus-sysdeps-win.h
)
set (DBUS_UTIL_SOURCES ${DBUS_UTIL_SOURCES}
dbus-spawn-win.c
dbus-sysdeps-util-win.c
)
if(WINCE)
set (DBUS_SHARED_SOURCES ${DBUS_SHARED_SOURCES}
dbus-sysdeps-wince-glue.c
)
set (DBUS_SHARED_HEADERS ${DBUS_SHARED_HEADERS}
dbus-sysdeps-wince-glue.h