mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-04-25 19:00:44 +02:00
Use lower case cmake keywords in CMakeLists.txt files
This commit is contained in:
parent
7dd83ba874
commit
3927b1dd39
5 changed files with 92 additions and 92 deletions
|
|
@ -8,7 +8,7 @@ set(CMAKE_LEGACY_CYGWIN_WIN32 0)
|
|||
project(dbus)
|
||||
|
||||
# we need to be up to date
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.0.2 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
|
||||
if(COMMAND cmake_policy)
|
||||
cmake_policy(SET CMP0003 NEW)
|
||||
endif(COMMAND cmake_policy)
|
||||
|
|
@ -106,7 +106,7 @@ set(DBUS_LIBEXECDIR ${CMAKE_INSTALL_FULL_LIBEXECDIR})
|
|||
set(DBUS_DATADIR ${CMAKE_INSTALL_FULL_DATADIR})
|
||||
|
||||
#enable building of shared library
|
||||
SET(BUILD_SHARED_LIBS ON)
|
||||
set(BUILD_SHARED_LIBS ON)
|
||||
|
||||
set(INSTALL_TARGETS_DEFAULT_ARGS EXPORT DBus1Targets RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
|
||||
|
|
@ -148,10 +148,10 @@ endif()
|
|||
add_definitions(-D_GNU_SOURCE)
|
||||
|
||||
# do config checks
|
||||
INCLUDE(ConfigureChecks)
|
||||
include(ConfigureChecks)
|
||||
|
||||
# @TODO: how to remove last dir from ${CMAKE_SOURCE_DIR} ?
|
||||
SET(DBUS_SOURCE_DIR ${CMAKE_SOURCE_DIR}/..)
|
||||
set(DBUS_SOURCE_DIR ${CMAKE_SOURCE_DIR}/..)
|
||||
|
||||
# make some more macros available
|
||||
include (MacroLibrary)
|
||||
|
|
@ -167,9 +167,9 @@ if(MSVC)
|
|||
#set(GROUP_CODE split) #cmake default
|
||||
set(GROUP_CODE flat)
|
||||
endif(NOT GROUP_CODE)
|
||||
ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
|
||||
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /FIconfig.h")
|
||||
SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /FIconfig.h")
|
||||
add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /FIconfig.h")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /FIconfig.h")
|
||||
option (DBUS_MSVC_ANALYZE "Enable code analyzing for MSVC compiler: /analyze" OFF)
|
||||
endif()
|
||||
|
||||
|
|
@ -228,8 +228,8 @@ 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")
|
||||
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)
|
||||
|
||||
|
|
@ -238,7 +238,7 @@ if(DBUS_WITH_GLIB)
|
|||
autodefine(GLIB_VERSION_MAX_ALLOWED)
|
||||
endif()
|
||||
|
||||
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG")
|
||||
|
||||
#########################################################################
|
||||
# Windows CE (>= 5.0.0)
|
||||
|
|
@ -260,13 +260,13 @@ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG")
|
|||
#
|
||||
if(WINCE)
|
||||
|
||||
MESSAGE("Building for WinCE (${CMAKE_SYSTEM_VERSION})")
|
||||
message("Building for WinCE (${CMAKE_SYSTEM_VERSION})")
|
||||
|
||||
endif(WINCE)
|
||||
#########################################################################
|
||||
|
||||
|
||||
ENABLE_TESTING()
|
||||
enable_testing()
|
||||
|
||||
#########################################################################
|
||||
# Disallow in-source build
|
||||
|
|
@ -297,7 +297,7 @@ include_directories( ${CMAKE_LIBRARY_PATH} )
|
|||
|
||||
set(DBUS_INCLUDES)
|
||||
|
||||
ENABLE_TESTING()
|
||||
enable_testing()
|
||||
|
||||
########### command line options ###############
|
||||
option (DBUS_BUILD_TESTS "enable unit test code" ON)
|
||||
|
|
@ -352,7 +352,7 @@ elseif("${CMAKE_SYSTEM_NAME}" MATCHES ".*BSD")
|
|||
endif(DBUS_BUS_ENABLE_KQUEUE)
|
||||
endif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
|
||||
|
||||
STRING(TOUPPER ${CMAKE_SYSTEM_NAME} sysname)
|
||||
string(TOUPPER ${CMAKE_SYSTEM_NAME} sysname)
|
||||
if("${sysname}" MATCHES ".*SOLARIS.*")
|
||||
option (HAVE_CONSOLE_OWNER_FILE "enable console owner file (solaris only)" ON)
|
||||
if(HAVE_CONSOLE_OWNER_FILE)
|
||||
|
|
@ -370,12 +370,12 @@ endif(NOT EXPAT_FOUND)
|
|||
set(atomic_int OFF)
|
||||
set(atomic_int486 OFF)
|
||||
if(CMAKE_COMPILER_IS_GNUCC AND NOT DBUS_ENABLE_ANSI)
|
||||
FIND_PROGRAM(UNAME_EXECUTABLE
|
||||
find_program(UNAME_EXECUTABLE
|
||||
NAMES uname
|
||||
PATHS /bin /usr/bin /usr/local/bin c:/Programme/MSys/bin d:/Programme/MSys/bin)
|
||||
|
||||
if(UNAME_EXECUTABLE)
|
||||
EXECUTE_PROCESS(COMMAND ${UNAME_EXECUTABLE} "-m"
|
||||
execute_process(COMMAND ${UNAME_EXECUTABLE} "-m"
|
||||
OUTPUT_VARIABLE UNAME_OUTPUT)
|
||||
|
||||
if("UNAME_OUTPUT" MATCHES "^.*i[0123]86.*$")
|
||||
|
|
@ -416,7 +416,7 @@ if (MSVC_IDE)
|
|||
message(STATUS)
|
||||
endif(CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
set (TEST_PATH_FORCE FORCE)
|
||||
FILE(REMOVE ${CMAKE_BINARY_DIR}/data/dbus-1/services)
|
||||
file(REMOVE ${CMAKE_BINARY_DIR}/data/dbus-1/services)
|
||||
endif (MSVC_IDE)
|
||||
|
||||
#### Find socket directories
|
||||
|
|
@ -553,14 +553,14 @@ add_subdirectory( tools )
|
|||
add_subdirectory( doc )
|
||||
|
||||
|
||||
OPTION(DBUS_INSTALL_SYSTEM_LIBS "install required system libraries" OFF)
|
||||
MESSAGE(" ")
|
||||
MESSAGE("set -DDBUS_INSTALL_SYSTEM_LIBS=1 to install runtime libraries too")
|
||||
MESSAGE("set DBUSDIR (environment or cmake option) to overwrite the default install directory ")
|
||||
MESSAGE(" ")
|
||||
MESSAGE(" ")
|
||||
GET_FILENAME_COMPONENT(C_COMPILER ${CMAKE_C_COMPILER} NAME)
|
||||
GET_FILENAME_COMPONENT(CXX_COMPILER ${CMAKE_CXX_COMPILER} NAME)
|
||||
option(DBUS_INSTALL_SYSTEM_LIBS "install required system libraries" OFF)
|
||||
message(" ")
|
||||
message("set -DDBUS_INSTALL_SYSTEM_LIBS=1 to install runtime libraries too")
|
||||
message("set DBUSDIR (environment or cmake option) to overwrite the default install directory ")
|
||||
message(" ")
|
||||
message(" ")
|
||||
get_filename_component(C_COMPILER ${CMAKE_C_COMPILER} NAME)
|
||||
get_filename_component(CXX_COMPILER ${CMAKE_CXX_COMPILER} NAME)
|
||||
|
||||
message(" D-BUS ${DBUS_VERSION} ")
|
||||
message(" ============= ")
|
||||
|
|
@ -627,7 +627,7 @@ if (MSVC)
|
|||
message(" build timestamp: ${DBUS_BUILD_TIMESTAMP} ")
|
||||
endif (MSVC)
|
||||
|
||||
MESSAGE(" ")
|
||||
message(" ")
|
||||
if (DBUS_BUILD_TESTS)
|
||||
message("NOTE: building with unit tests increases the size of the installed library and renders it insecure.")
|
||||
endif(DBUS_BUILD_TESTS)
|
||||
|
|
@ -656,9 +656,9 @@ foreach(_note ${FOOTNOTES})
|
|||
message(${_note})
|
||||
endforeach()
|
||||
|
||||
MESSAGE(" ")
|
||||
message(" ")
|
||||
|
||||
INCLUDE(CPackInstallConfig)
|
||||
include(CPackInstallConfig)
|
||||
|
||||
add_custom_target(help-options
|
||||
cmake -LH
|
||||
|
|
|
|||
|
|
@ -1,29 +1,29 @@
|
|||
add_definitions(-DDBUS_COMPILATION)
|
||||
|
||||
SET(EFENCE "")
|
||||
set(EFENCE "")
|
||||
|
||||
# config files for installation
|
||||
CONFIGURE_FILE( "session.conf.in" "${CMAKE_CURRENT_BINARY_DIR}/session.conf" IMMEDIATE @ONLY)
|
||||
CONFIGURE_FILE( "legacy-config/session.conf.in" "${CMAKE_CURRENT_BINARY_DIR}/legacy-config/session.conf" IMMEDIATE @ONLY)
|
||||
FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/session.d)
|
||||
configure_file( "session.conf.in" "${CMAKE_CURRENT_BINARY_DIR}/session.conf" IMMEDIATE @ONLY)
|
||||
configure_file( "legacy-config/session.conf.in" "${CMAKE_CURRENT_BINARY_DIR}/legacy-config/session.conf" IMMEDIATE @ONLY)
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/session.d)
|
||||
|
||||
if(NOT WIN32)
|
||||
CONFIGURE_FILE( "system.conf.in" "${CMAKE_CURRENT_BINARY_DIR}/system.conf" IMMEDIATE @ONLY)
|
||||
CONFIGURE_FILE( "legacy-config/system.conf.in" "${CMAKE_CURRENT_BINARY_DIR}/legacy-config/system.conf" IMMEDIATE @ONLY)
|
||||
FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/system.d)
|
||||
configure_file( "system.conf.in" "${CMAKE_CURRENT_BINARY_DIR}/system.conf" IMMEDIATE @ONLY)
|
||||
configure_file( "legacy-config/system.conf.in" "${CMAKE_CURRENT_BINARY_DIR}/legacy-config/system.conf" IMMEDIATE @ONLY)
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/system.d)
|
||||
endif()
|
||||
|
||||
# copy services for local daemon start to local service dir data/dbus-1/services
|
||||
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)
|
||||
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} )
|
||||
ENDFOREACH(FILE)
|
||||
endforeach(FILE)
|
||||
|
||||
|
||||
if (DBUS_BUS_ENABLE_INOTIFY)
|
||||
|
|
|
|||
|
|
@ -320,7 +320,7 @@ endif(WIN32)
|
|||
|
||||
if (UNIX)
|
||||
# set version info
|
||||
ENDIF (UNIX)
|
||||
endif(UNIX)
|
||||
|
||||
|
||||
## mop up the gcov files
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ find_package(Doxygen)
|
|||
add_custom_target(doc ALL)
|
||||
|
||||
if(DOXYGEN_EXECUTABLE)
|
||||
OPTION(DBUS_ENABLE_DOXYGEN_DOCS "build DOXYGEN documentation (requires Doxygen)" ON)
|
||||
option(DBUS_ENABLE_DOXYGEN_DOCS "build DOXYGEN documentation (requires Doxygen)" ON)
|
||||
endif(DOXYGEN_EXECUTABLE)
|
||||
|
||||
if (DBUS_ENABLE_DOXYGEN_DOCS)
|
||||
|
|
@ -94,22 +94,22 @@ endmacro(DOCBOOK)
|
|||
### copy tests to builddir so that generated tests and static tests
|
||||
### are all in one place.
|
||||
### todo how to add more filetypes
|
||||
MACRO (COPYDIR _src _type)
|
||||
FOREACH(FILE_TYPE ${_type})
|
||||
FOREACH(DIR ${_src})
|
||||
FILE(GLOB FILES "${DIR}/${FILE_TYPE}" )
|
||||
FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/${DIR})
|
||||
FOREACH(FILE ${FILES})
|
||||
GET_FILENAME_COMPONENT(FILENAME ${FILE} NAME)
|
||||
SET (TARGET ${CMAKE_BINARY_DIR}/${DIR}/${FILENAME})
|
||||
macro(COPYDIR _src _type)
|
||||
foreach(FILE_TYPE ${_type})
|
||||
foreach(DIR ${_src})
|
||||
file(GLOB FILES "${DIR}/${FILE_TYPE}" )
|
||||
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/${DIR})
|
||||
foreach(FILE ${FILES})
|
||||
get_filename_component(FILENAME ${FILE} NAME)
|
||||
set(TARGET ${CMAKE_BINARY_DIR}/${DIR}/${FILENAME})
|
||||
configure_file(${FILE} ${TARGET} COPYONLY)
|
||||
IF (CONFIG_VERBOSE)
|
||||
MESSAGE("FROM: ${FILE}\nTO: ${TARGET}\n")
|
||||
ENDIF (CONFIG_VERBOSE)
|
||||
ENDFOREACH(FILE)
|
||||
ENDFOREACH(DIR)
|
||||
ENDFOREACH(FILE_TYPE)
|
||||
ENDMACRO (COPYDIR)
|
||||
if(CONFIG_VERBOSE)
|
||||
message("FROM: ${FILE}\nTO: ${TARGET}\n")
|
||||
endif(CONFIG_VERBOSE)
|
||||
endforeach(FILE)
|
||||
endforeach(DIR)
|
||||
endforeach(FILE_TYPE)
|
||||
endmacro(COPYDIR)
|
||||
|
||||
COPYDIR(doc *.png)
|
||||
COPYDIR(doc *.svg)
|
||||
|
|
|
|||
|
|
@ -209,45 +209,45 @@ set (TESTDIRS
|
|||
)
|
||||
set (CONFIG_VERBOSE 1)
|
||||
|
||||
FOREACH(DIR ${TESTDIRS})
|
||||
FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/${DIR})
|
||||
ENDFOREACH(DIR)
|
||||
foreach(DIR ${TESTDIRS})
|
||||
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/${DIR})
|
||||
endforeach(DIR)
|
||||
|
||||
### copy tests to builddir so that generated tests and static tests
|
||||
### are all in one place.
|
||||
MESSAGE(STATUS "Copying test files to test directory")
|
||||
FOREACH(FILE_TYPE *.message-raw *.auth-script *.sha1 *.txt *.conf *.service)
|
||||
FOREACH(DIR ${TESTDIRS})
|
||||
FILE(GLOB FILES "${DIR}/${FILE_TYPE}" )
|
||||
FOREACH(FILE ${FILES})
|
||||
GET_FILENAME_COMPONENT(FILENAME ${FILE} NAME)
|
||||
SET (TARGET ${CMAKE_CURRENT_BINARY_DIR}/${DIR}/${FILENAME})
|
||||
message(STATUS "Copying test files to test directory")
|
||||
foreach(FILE_TYPE *.message-raw *.auth-script *.sha1 *.txt *.conf *.service)
|
||||
foreach(DIR ${TESTDIRS})
|
||||
file(GLOB FILES "${DIR}/${FILE_TYPE}" )
|
||||
foreach(FILE ${FILES})
|
||||
get_filename_component(FILENAME ${FILE} NAME)
|
||||
set(TARGET ${CMAKE_CURRENT_BINARY_DIR}/${DIR}/${FILENAME})
|
||||
configure_file(${FILE} ${TARGET} COPYONLY)
|
||||
IF (CONFIG_VERBOSE)
|
||||
MESSAGE("${FILE}")
|
||||
ENDIF (CONFIG_VERBOSE)
|
||||
ENDFOREACH(FILE)
|
||||
ENDFOREACH(DIR)
|
||||
ENDFOREACH(FILE_TYPE)
|
||||
if(CONFIG_VERBOSE)
|
||||
message("${FILE}")
|
||||
endif(CONFIG_VERBOSE)
|
||||
endforeach(FILE)
|
||||
endforeach(DIR)
|
||||
endforeach(FILE_TYPE)
|
||||
|
||||
### generate test files
|
||||
MESSAGE(STATUS "Generating test files from templates into test directory")
|
||||
message(STATUS "Generating test files from templates into test directory")
|
||||
|
||||
FOREACH(FILE_TYPE *.conf.in *.service.in)
|
||||
FOREACH(DIR ${TESTDIRS})
|
||||
FILE(GLOB FILES "${DIR}/${FILE_TYPE}" )
|
||||
FOREACH(FILE ${FILES})
|
||||
GET_FILENAME_COMPONENT(FILENAME ${FILE} NAME)
|
||||
STRING(REGEX REPLACE "\\.in$" "" FILENAME ${FILENAME})
|
||||
SET (TARGET ${CMAKE_CURRENT_BINARY_DIR}/${DIR}/${FILENAME})
|
||||
foreach(FILE_TYPE *.conf.in *.service.in)
|
||||
foreach(DIR ${TESTDIRS})
|
||||
file(GLOB FILES "${DIR}/${FILE_TYPE}" )
|
||||
foreach(FILE ${FILES})
|
||||
get_filename_component(FILENAME ${FILE} NAME)
|
||||
string(REGEX REPLACE "\\.in$" "" FILENAME ${FILENAME})
|
||||
set(TARGET ${CMAKE_CURRENT_BINARY_DIR}/${DIR}/${FILENAME})
|
||||
configure_file(${FILE} ${TARGET} @ONLY IMMEDIATE)
|
||||
IF (CONFIG_VERBOSE)
|
||||
MESSAGE("${FILE}")
|
||||
ENDIF (CONFIG_VERBOSE)
|
||||
ENDFOREACH(FILE)
|
||||
ENDFOREACH(DIR)
|
||||
ENDFOREACH(FILE_TYPE)
|
||||
if(CONFIG_VERBOSE)
|
||||
message("${FILE}")
|
||||
endif(CONFIG_VERBOSE)
|
||||
endforeach(FILE)
|
||||
endforeach(DIR)
|
||||
endforeach(FILE_TYPE)
|
||||
|
||||
MESSAGE(STATUS "Copying generated bus config files to test directory")
|
||||
message(STATUS "Copying generated bus config files to test directory")
|
||||
configure_file(../bus/session.conf.in ${CMAKE_BINARY_DIR}/test/data/valid-config-files/session.conf @ONLY)
|
||||
configure_file(../bus/system.conf.in ${CMAKE_BINARY_DIR}/test/data/valid-config-files-system/system.conf @ONLY)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue