diff --git a/3rdparty/qtiocompressor/CMakeLists.txt b/3rdparty/qtiocompressor/CMakeLists.txt deleted file mode 100644 index 2767969e4..000000000 --- a/3rdparty/qtiocompressor/CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ -set(qtiocompressor_SRCS - qtiocompressor.cpp -) - -set(qtiocompressor_MOC_HDRS - qtiocompressor.h -) - -QT4_WRAP_CPP(qtiocompressor_MOC_SRCS ${qtiocompressor_MOC_HDRS}) - -include_directories( - ${ZLIB_INCLUDE_DIR} -) - -add_library(qtiocompressor OBJECT - ${qtiocompressor_SRCS} - ${qtiocompressor_MOC_SRCS} -) diff --git a/CMakeLists.txt b/CMakeLists.txt index d11fbce31..855b4bc2c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.8) +cmake_minimum_required(VERSION 2.6) project(mmapper) find_package(Qt4 REQUIRED) @@ -14,14 +14,15 @@ find_path(QTIOCOMPRESSOR_INCLUDE_DIRS qtiocompressor.h PATH_SUFFIXES QtSolutions find_library(QTIOCOMPRESSOR_LIBRARIES QtSolutions_IOCompressor-2.3) if (QTIOCOMPRESSOR_INCLUDE_DIRS AND QTIOCOMPRESSOR_LIBRARIES) message(STATUS "Found QtIOCompressor: ${QTIOCOMPRESSOR_LIBRARIES}") - set(QTIOCOMPRESSOR_INTERNAL "") + set(qtiocompressor_SRCS "") + set(qtiocompressor_MOC_HDRS "") else() message(STATUS "QtIOCompressor not found; using bundled copy.") find_package(ZLIB REQUIRED) - add_subdirectory(3rdparty/qtiocompressor) set(QTIOCOMPRESSOR_INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/3rdparty/qtiocompressor) set(QTIOCOMPRESSOR_LIBRARIES "") - set(QTIOCOMPRESSOR_INTERNAL $) + set(qtiocompressor_SRCS ${PROJECT_SOURCE_DIR}/3rdparty/qtiocompressor/qtiocompressor.cpp) + set(qtiocompressor_MOC_HDRS ${PROJECT_SOURCE_DIR}/3rdparty/qtiocompressor/qtiocompressor.h) endif() # Version diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index af9fd1dca..fe1722e3c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -150,7 +150,7 @@ include_directories( ${QTIOCOMPRESSOR_INCLUDE_DIRS} ) -QT4_WRAP_CPP(mmapper_MOC_SRCS ${mmapper_MOC_HDRS}) +QT4_WRAP_CPP(mmapper_MOC_SRCS ${mmapper_MOC_HDRS} ${qtiocompressor_MOC_HDRS}) QT4_WRAP_UI(mmapper_UIS_H ${mmapper_UIS}) QT4_ADD_RESOURCES(mmapper_RCC_SRCS ${mmapper_RCS}) @@ -165,7 +165,7 @@ add_executable(mmapper ${EXECUTABLE_FLAGS} ${mmapper_UIS_H} ${mmapper_RCC_SRCS} ${mmapper_WINRC} - ${QTIOCOMPRESSOR_INTERNAL} + ${qtiocompressor_SRCS} ) target_link_libraries(mmapper