mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-22 10:37:10 +01:00
[libmupdf] fix build error on Linux (#10708)
* minimum to compile on linux * Update as reviewed * Update baseline and add the condition to execuate script * Move find_program and make it REQUIRED * always execute generate command * only use make in find_program Co-authored-by: Nancy Li (Beyondsoft Corporation) <v-ruil@microsoft.com>
This commit is contained in:
parent
a3197f135d
commit
c0d6fc23c1
@ -3,26 +3,39 @@ project(libmupdf C)
|
||||
|
||||
set(CMAKE_DEBUG_POSTFIX d)
|
||||
|
||||
if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/include/mupdf/pdf/name-table.h")
|
||||
if(WIN32)
|
||||
execute_process(
|
||||
COMMAND "cmd.exe" "/c" "platform\\win32\\generate.bat"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
find_program(MAKE_EXE NAMES make REQUIRED)
|
||||
execute_process(
|
||||
COMMAND ${MAKE_EXE} "generate"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
find_package(freetype NO_MODULE REQUIRED)
|
||||
find_package(JPEG REQUIRED)
|
||||
find_path(HARFBUZZ_INCLUDE hb.h PATH_SUFFIXES harfbuzz)
|
||||
find_library(HARFBUZZ_LIBRARIES harfbuzz)
|
||||
find_package(ZLIB REQUIRED)
|
||||
find_package(openjpeg REQUIRED)
|
||||
find_package(OpenJPEG CONFIG REQUIRED)
|
||||
find_library(JBIG2DEC_LIB NAMES jbig2decd jbig2dec)
|
||||
|
||||
file(GLOB_RECURSE SOURCES "source/*.c" "generated/*.c")
|
||||
list(FILTER SOURCES EXCLUDE REGEX "source/tools/[a-z]*\\.c$")
|
||||
list(FILTER SOURCES EXCLUDE REGEX "source/tests/.*.c$")
|
||||
|
||||
add_library(libmupdf ${SOURCES})
|
||||
|
||||
target_compile_definitions(libmupdf PRIVATE -DSHARE_JPEG -DFZ_ENABLE_JS=0 -DFZ_ENABLE_ICC=0)
|
||||
if(WIN32)
|
||||
target_compile_definitions(libmupdf PRIVATE -DSHARE_JPEG -DFZ_ENABLE_JS=0 -DFZ_ENABLE_ICC=0)
|
||||
else()
|
||||
target_compile_definitions(libmupdf PRIVATE -DSHARE_JPEG -DFZ_ENABLE_JS=0 -DFZ_ENABLE_ICC=0 -DHAVE_PTHREAD=1)
|
||||
endif()
|
||||
target_include_directories(libmupdf
|
||||
PUBLIC
|
||||
include
|
||||
|
@ -1,5 +1,6 @@
|
||||
Source: libmupdf
|
||||
Version: 1.16.1
|
||||
Version: 1.16.1-1
|
||||
Build-Depends: freetype, libjpeg-turbo, harfbuzz, zlib, curl, glfw3, openjpeg, jbig2dec
|
||||
Homepage: https://github.com/ArtifexSoftware/mupdf
|
||||
Description: a lightweight PDF, XPS, and E-book library
|
||||
Supports: !osx
|
||||
|
@ -1,4 +1,4 @@
|
||||
include(vcpkg_common_functions)
|
||||
vcpkg_fail_port_install(ON_TARGET "osx")
|
||||
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
@ -18,6 +18,8 @@ vcpkg_configure_cmake(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
DISABLE_PARALLEL_CONFIGURE
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DBUILD_EXAMPLES=OFF
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
@ -820,7 +820,6 @@ libmodman:x64-uwp=fail
|
||||
libmodman:x64-windows-static=fail
|
||||
libmodplug:arm-uwp=fail
|
||||
libmodplug:x64-uwp=fail
|
||||
libmupdf:x64-linux=fail
|
||||
libmupdf:x64-osx=fail
|
||||
libmysql:x86-windows=fail
|
||||
libnice:x64-linux=fail
|
||||
|
Loading…
x
Reference in New Issue
Block a user