From fa0e8b83dfa54ede4c4a864c1525bb77aea62eb8 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Wed, 16 Dec 2015 04:15:31 +0200 Subject: [PATCH] minor build system cleanups Signed-off-by: Ivailo Monev --- CMakeLists.txt | 4 ++++ src/core/CMakeLists.txt | 9 ++++++++- src/svg/CMakeLists.txt | 2 -- src/tools/uic/CMakeLists.txt | 2 -- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index db1653abd..b01806db8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -462,6 +462,10 @@ if(ENABLE_TESTING) add_definitions(-DQT_BUILD_INTERNAL) endif() +if(NOT WITH_ZLIB OR NOT ZLIB_FOUND) + katie_definition(-DQT_NO_COMPRESS) +endif() + if(NOT WTIH_EGL OR NOT EGL_FOUND) katie_definition(-DQT_NO_EGL) endif() diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 54a2c8e88..4fd7ccef2 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -1,5 +1,5 @@ add_definitions(-DQT_BUILD_CORE_LIB) -set(EXTRA_CORE_LIBS ${ZLIB_LIBRARIES}) +set(EXTRA_CORE_LIBS) set(CORE_PUBLIC_HEADERS ${CORE_PUBLIC_HEADERS} @@ -306,6 +306,13 @@ if(WITH_GLIB2 AND GLIB2_FOUND) include_directories(${GLIB2_INCLUDE_DIR}) endif() +if(WITH_ZLIB AND ZLIB_FOUND) + set(EXTRA_CORE_LIBS + ${EXTRA_CORE_LIBS} + ${ZLIB_LIBRARIES} + ) + include_directories(${ZLIB_INCLUDE_DIRS}) +endif() if(${KATIE_PLATFORM} STREQUAL "linux") set(EXTRA_CORE_LIBS diff --git a/src/svg/CMakeLists.txt b/src/svg/CMakeLists.txt index 5de08a9ef..cccaf7e25 100644 --- a/src/svg/CMakeLists.txt +++ b/src/svg/CMakeLists.txt @@ -60,8 +60,6 @@ if(WITH_ZLIB AND ZLIB_FOUND) ${ZLIB_LIBRARIES} ) include_directories(${ZLIB_INCLUDE_DIRS}) -else() - katie_definition(-DQT_NO_COMPRESS) endif() katie_generate_misc("${SVG_HEADERS}" QtSvg) diff --git a/src/tools/uic/CMakeLists.txt b/src/tools/uic/CMakeLists.txt index fbc8960d8..fe7243926 100644 --- a/src/tools/uic/CMakeLists.txt +++ b/src/tools/uic/CMakeLists.txt @@ -6,8 +6,6 @@ include_directories( ${CMAKE_BINARY_DIR}/privateinclude ${CMAKE_BINARY_DIR}/include/QtCore ${CMAKE_BINARY_DIR}/privateinclude/QtCore - ${CMAKE_BINARY_DIR}/include/QtXml - ${CMAKE_BINARY_DIR}/privateinclude/QtXml ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cpp ${BOOTSTRAP_INCLUDES} -- 2.11.0