summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2015-02-04 11:44:53 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2015-02-04 11:44:53 +0100
commit03658bff3d73ef5bb4fb6ca69c87b205563a762e (patch)
treee6cfdb1c5048d4958d6d56208a164b558ccc6cc5
parent7b5327f828a324819fc55a484b7fc4a7a615c1d1 (diff)
downloadMinedMap-03658bff3d73ef5bb4fb6ca69c87b205563a762e.tar
MinedMap-03658bff3d73ef5bb4fb6ca69c87b205563a762e.zip
build: don't use pkg-config
-rw-r--r--CMakeLists.txt5
-rw-r--r--src/CMakeLists.txt9
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})