Skip to content

Commit

Permalink
Avoid the dependency on too new cmake
Browse files Browse the repository at this point in the history
This started causing grief for users who didn't have access to updated
cmake versions; revert the Object Library support for now.

git-svn-id: svn://svn.code.sf.net/p/mmapper/code/trunk/mmapper@220 14c008a5-6e10-0410-bf79-c100e0f1932b
  • Loading branch information
klember committed Jul 14, 2013
1 parent 5afec18 commit 0260f0b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 24 deletions.
18 changes: 0 additions & 18 deletions 3rdparty/qtiocompressor/CMakeLists.txt

This file was deleted.

9 changes: 5 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.8)
cmake_minimum_required(VERSION 2.6)
project(mmapper)

find_package(Qt4 REQUIRED)
Expand All @@ -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 $<TARGET_OBJECTS:qtiocompressor>)
set(qtiocompressor_SRCS ${PROJECT_SOURCE_DIR}/3rdparty/qtiocompressor/qtiocompressor.cpp)
set(qtiocompressor_MOC_HDRS ${PROJECT_SOURCE_DIR}/3rdparty/qtiocompressor/qtiocompressor.h)
endif()

# Version
Expand Down
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})

Expand All @@ -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
Expand Down

0 comments on commit 0260f0b

Please sign in to comment.