VirtualBox

source: vbox/trunk/src/libs/libpng-1.6.42/contrib/pngminus/CMakeLists.txt@ 103585

最後變更 在這個檔案從103585是 103316,由 vboxsync 提交於 12 月 前

libpng-1.6.42: Applied and adjusted our libpng changes to 1.6.42. bugref:8515

  • 屬性 svn:eol-style 設為 native
檔案大小: 1.5 KB
 
1# Copyright (c) 2018-2024 Cosmin Truta
2#
3# This software is released under the MIT license. For conditions of
4# distribution and use, see the LICENSE file part of this package.
5
6cmake_minimum_required(VERSION 3.5)
7
8project(PNGMINUS C)
9
10option(PNGMINUS_USE_SYSTEM_PNG
11 "Use the libpng build found in the system" OFF)
12
13add_executable(png2pnm png2pnm.c)
14add_executable(pnm2png pnm2png.c)
15
16if(PNGMINUS_USE_SYSTEM_PNG)
17 # Use the system libpng.
18 find_package(PNG REQUIRED)
19 target_link_libraries(png2pnm PRIVATE PNG::PNG)
20 target_link_libraries(pnm2png PRIVATE PNG::PNG)
21else()
22 # Build and use the internal libpng.
23 # Configure libpng for static linking, to produce single-file executables.
24 set(PNG_STATIC ON
25 CACHE STRING "Build the internal libpng as a static library" FORCE)
26 set(PNG_SHARED OFF
27 CACHE STRING "Build the internal libpng as a shared library" FORCE)
28 set(PNG_FRAMEWORK OFF
29 CACHE STRING "Build the internal libpng as a framework bundle" FORCE)
30 add_subdirectory(../.. libpng)
31 target_include_directories(png2pnm PRIVATE
32 "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../..>"
33 "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/libpng>"
34 )
35 target_include_directories(pnm2png PRIVATE
36 "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../..>"
37 "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/libpng>"
38 )
39 target_link_libraries(png2pnm PRIVATE png_static)
40 target_link_libraries(pnm2png PRIVATE png_static)
41endif()
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette