diff options
-rw-r--r-- | CMakeLists.txt | 5 | ||||
-rw-r--r-- | src/CMakeLists.txt | 9 |
2 files changed, 6 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 865da6e..2cc6467 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,9 +2,8 @@ cmake_minimum_required(VERSION 2.8.4) project(MINEDMAP CXX) -find_package(PkgConfig REQUIRED) -pkg_check_modules(LIBPNG REQUIRED libpng>=1.2) -pkg_check_modules(ZLIB REQUIRED zlib) +find_package(PNG REQUIRED) +find_package(ZLIB REQUIRED) add_subdirectory(src) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8815881..f433bd4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,5 +1,5 @@ -include_directories(${ZLIB_INCLUDE_DIRS} ${LIBPNG_INCLUDE_DIRS}) -link_directories(${ZLIB_LIBRARY_DIRS} ${LIBPNG_LIBRARY_DIRS}) +include_directories(${ZLIB_INCLUDE_DIRS} ${PNG_INCLUDE_DIRS}) +add_definitions(${PNG_DEFINITIONS}) add_executable(MinedMap MinedMap.cpp @@ -15,6 +15,5 @@ add_executable(MinedMap World/Level.cpp World/Region.cpp ) -set_target_properties(MinedMap PROPERTIES COMPILE_FLAGS "-std=c++11 -Wall ${ZLIB_CFLAGS_OTHER} ${LIBPNG_CFLAGS_OTHER}") -set_target_properties(MinedMap PROPERTIES LINK_FLAGS "${ZLIB_LDFLAGS_OTHER} ${LIBPNG_LDFLAGS_OTHER}") -target_link_libraries(MinedMap ${ZLIB_LIBRARIES} ${LIBPNG_LIBRARIES}) +set_target_properties(MinedMap PROPERTIES COMPILE_FLAGS "-std=c++11 -Wall") +target_link_libraries(MinedMap ${ZLIB_LIBRARIES} ${PNG_LIBRARIES}) |