summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Akulich <akulichalexander@gmail.com>2019-11-07 02:24:56 +0300
committerAlexander Akulich <akulichalexander@gmail.com>2019-11-08 02:03:55 +0300
commit148f88dcf49577b9518ee7c8ad6c65c2c10e7ea8 (patch)
tree87becbc3fee2d5dbfc6e8fcc8e5fa2ad827ba604
parent025639ec6ad994d8b22a73fb4dca257803dd5cb5 (diff)
CMake: Refactor internal/private build definitions
-rw-r--r--TelepathyQt/CMakeLists.txt6
-rw-r--r--TelepathyQt/Farstream/CMakeLists.txt10
2 files changed, 8 insertions, 8 deletions
diff --git a/TelepathyQt/CMakeLists.txt b/TelepathyQt/CMakeLists.txt
index 626d9531..f79d3d6c 100644
--- a/TelepathyQt/CMakeLists.txt
+++ b/TelepathyQt/CMakeLists.txt
@@ -4,9 +4,6 @@ file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/_gen")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${VISIBILITY_HIDDEN_FLAGS} ${COMPILER_COVERAGE_FLAGS} ${DEPRECATED_DECLARATIONS_FLAGS}")
set(LD_FLAGS "${LD_FLAGS} ${VISIBILITY_HIDDEN_FLAGS} ${COMPILER_COVERAGE_FLAGS} ${DEPRECATED_DECLARATIONS_FLAGS}")
-# We are building Telepathy-Qt
-add_definitions(-DBUILDING_TP_QT)
-
configure_file(global.h.in ${CMAKE_CURRENT_BINARY_DIR}/global.h)
# Sources for Tp-Qt
@@ -752,6 +749,9 @@ else ()
add_library(telepathy-qt${QT_VERSION_MAJOR} SHARED ${telepathy_qt_SRCS})
endif ()
+# We are building Telepathy-Qt
+target_compile_definitions(telepathy-qt${QT_VERSION_MAJOR} PRIVATE BUILDING_TP_QT)
+
# Library used by tests to test some unexported functionality
add_library(telepathy-qt-test-backdoors STATIC ${telepathy_qt_test_backdoors_SRCS})
add_dependencies(telepathy-qt-test-backdoors stable-constants)
diff --git a/TelepathyQt/Farstream/CMakeLists.txt b/TelepathyQt/Farstream/CMakeLists.txt
index 6ddc9c6a..fe542967 100644
--- a/TelepathyQt/Farstream/CMakeLists.txt
+++ b/TelepathyQt/Farstream/CMakeLists.txt
@@ -7,11 +7,6 @@ if(FARSTREAM_COMPONENTS_FOUND)
${LIBXML2_INCLUDE_DIR}
${DBUS_INCLUDE_DIR})
- # It gets inherited from the previous directory, hence it has to be removed explicitely
- remove_definitions(-DBUILDING_TP_QT)
- # We are building Telepathy-Qt-Farstream
- add_definitions(-DBUILDING_TP_QT_FARSTREAM -DQT_NO_KEYWORDS)
-
set(telepathy_qt_farstream_SRCS
channel.cpp)
@@ -37,6 +32,11 @@ if(FARSTREAM_COMPONENTS_FOUND)
${telepathy_qt_farstream_SRCS} ${telepathy_qt_farstream_MOC_SRCS})
endif ()
+ # We are building Telepathy-Qt-Farstream
+ target_compile_definitions(telepathy-qt${QT_VERSION_MAJOR}-farstream PRIVATE
+ BUILDING_TP_QT_FARSTREAM
+ QT_NO_KEYWORDS)
+
# Link
target_link_libraries(telepathy-qt${QT_VERSION_MAJOR}-farstream
${QT_QTDBUS_LIBRARY}