summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2017-05-28 04:05:50 +0200
committerYuri Kunde Schlesner <yuriks@yuriks.net>2017-05-28 05:44:51 +0200
commit4660bc1c786b5f9d3fed74b6b51a8ba3e468d7e4 (patch)
tree00b0fb618413536758aef0679051d2dcf6e79169
parentTravis: Upgrade to CMake 3.6.3 (diff)
downloadyuzu-4660bc1c786b5f9d3fed74b6b51a8ba3e468d7e4.tar
yuzu-4660bc1c786b5f9d3fed74b6b51a8ba3e468d7e4.tar.gz
yuzu-4660bc1c786b5f9d3fed74b6b51a8ba3e468d7e4.tar.bz2
yuzu-4660bc1c786b5f9d3fed74b6b51a8ba3e468d7e4.tar.lz
yuzu-4660bc1c786b5f9d3fed74b6b51a8ba3e468d7e4.tar.xz
yuzu-4660bc1c786b5f9d3fed74b6b51a8ba3e468d7e4.tar.zst
yuzu-4660bc1c786b5f9d3fed74b6b51a8ba3e468d7e4.zip
-rw-r--r--CMakeLists.txt8
-rw-r--r--src/video_core/CMakeLists.txt5
2 files changed, 5 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 121b0f2f8..100fd9a62 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,5 @@
-# CMake 3.2 required for cmake to know the right flags for CXX standard on OSX
-cmake_minimum_required(VERSION 3.2)
+# CMake 3.5 required for support for IMPORTED find_package libraries
+cmake_minimum_required(VERSION 3.5)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/CMakeModules)
function(download_bundled_external remote_path lib_name prefix_var)
@@ -131,9 +131,7 @@ set_property(DIRECTORY APPEND PROPERTY
COMPILE_DEFINITIONS $<$<CONFIG:Debug>:_DEBUG> $<$<NOT:$<CONFIG:Debug>>:NDEBUG>)
find_package(PNG QUIET)
-if (PNG_FOUND)
- add_definitions(-DHAVE_PNG)
-else()
+if (NOT PNG_FOUND)
message(STATUS "libpng not found. Some debugging features have been disabled.")
endif()
diff --git a/src/video_core/CMakeLists.txt b/src/video_core/CMakeLists.txt
index e455f03bd..45f4ad2d5 100644
--- a/src/video_core/CMakeLists.txt
+++ b/src/video_core/CMakeLists.txt
@@ -87,7 +87,6 @@ if (ARCHITECTURE_x86_64)
endif()
if (PNG_FOUND)
- target_link_libraries(video_core PRIVATE ${PNG_LIBRARIES})
- target_include_directories(video_core PRIVATE ${PNG_INCLUDE_DIRS})
- target_compile_definitions(video_core PRIVATE ${PNG_DEFINITIONS})
+ target_link_libraries(video_core PRIVATE PNG::PNG)
+ target_compile_definitions(video_core PRIVATE HAVE_PNG)
endif()