mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 04:50:09 +00:00
fix including config.h for fontforge
This commit is contained in:
parent
d8d0bb026d
commit
60d6090940
@ -17,7 +17,8 @@ else()
|
|||||||
find_path(FF_INCLUDE_PATH fontforge/fontforge.h)
|
find_path(FF_INCLUDE_PATH fontforge/fontforge.h)
|
||||||
if(FF_INCLUDE_PATH)
|
if(FF_INCLUDE_PATH)
|
||||||
message("Found fontforge.h: ${FF_INCLUDE_PATH}/fontforge/fontforge.h")
|
message("Found fontforge.h: ${FF_INCLUDE_PATH}/fontforge/fontforge.h")
|
||||||
include_directories(${FF_INCLUDE_PATH}/fontforge)
|
set(FONTFORGE_INCLUDE_DIRS ${FF_INCLUDE_PATH}/fontforge)
|
||||||
|
include_directories(${FONTFORGE_INCLUDE_DIRS})
|
||||||
# MacOSX gettext is in /opt/local/include - strange
|
# MacOSX gettext is in /opt/local/include - strange
|
||||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||||
find_path(GETTEXT_INCLUDE_PATH libintl.h)
|
find_path(GETTEXT_INCLUDE_PATH libintl.h)
|
||||||
@ -32,11 +33,6 @@ else()
|
|||||||
message(FATAL_ERROR "Error: cannot locate fontforge.h")
|
message(FATAL_ERROR "Error: cannot locate fontforge.h")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_path(FF_CONFIG_INCLUDE_PATH fontforge/config.h)
|
|
||||||
if(FF_CONFIG_INCLUDE_PATH)
|
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -include ${FF_INCLUDE_PATH}/fontforge/config.h")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
foreach(FF_LIB_NAME
|
foreach(FF_LIB_NAME
|
||||||
${CMAKE_IMPORT_LIBRARY_PREFIX}fontforge${CMAKE_IMPORT_LIBRARY_SUFFIX}
|
${CMAKE_IMPORT_LIBRARY_PREFIX}fontforge${CMAKE_IMPORT_LIBRARY_SUFFIX}
|
||||||
${CMAKE_SHARED_LIBRARY_PREFIX}fontforge${CMAKE_SHARED_LIBRARY_SUFFIX}
|
${CMAKE_SHARED_LIBRARY_PREFIX}fontforge${CMAKE_SHARED_LIBRARY_SUFFIX}
|
||||||
@ -58,6 +54,12 @@ else()
|
|||||||
message("Looking for libraries of python, which is required by fontforge, if you can link fontforge without python, you may disable this")
|
message("Looking for libraries of python, which is required by fontforge, if you can link fontforge without python, you may disable this")
|
||||||
pkg_search_module(PYTHON python python-2.7)
|
pkg_search_module(PYTHON python python-2.7)
|
||||||
endif()
|
endif()
|
||||||
|
find_path(FF_CONFIG_INCLUDE_PATH config.h PATHS ${FONTFORGE_INCLUDE_DIRS})
|
||||||
|
if(FF_CONFIG_INCLUDE_PATH)
|
||||||
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -include ${FF_CONFIG_INCLUDE_PATH}/config.h")
|
||||||
|
else()
|
||||||
|
message("Cannot locate config.h for fontforge")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -69,16 +71,16 @@ add_custom_target(dist
|
|||||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
|
||||||
|
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wunused-function")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wunused-function")
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2")
|
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2")
|
||||||
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ggdb")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ggdb")
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wunused-function")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wunused-function")
|
||||||
# clang compiler need c++11 flag
|
# clang compiler need c++11 flag
|
||||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
|
||||||
endif()
|
endif()
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
|
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
|
||||||
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ggdb")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ggdb")
|
||||||
|
|
||||||
# CYGWIN bug
|
# CYGWIN bug
|
||||||
if(CYGWIN)
|
if(CYGWIN)
|
||||||
|
2
TODO
2
TODO
@ -1,5 +1,3 @@
|
|||||||
change typo asc/desc, without affecting EM size
|
|
||||||
|
|
||||||
rename single-html -> embed-font/image/css ...
|
rename single-html -> embed-font/image/css ...
|
||||||
|
|
||||||
bug found in baidu & github & mail
|
bug found in baidu & github & mail
|
||||||
|
1
src/ff.c
1
src/ff.c
@ -89,6 +89,7 @@ void ff_load_font(const char * filename)
|
|||||||
{
|
{
|
||||||
char * _filename = strcopy(filename);
|
char * _filename = strcopy(filename);
|
||||||
SplineFont * font = LoadSplineFont(_filename, 1);
|
SplineFont * font = LoadSplineFont(_filename, 1);
|
||||||
|
|
||||||
free(_filename);
|
free(_filename);
|
||||||
|
|
||||||
if(!font)
|
if(!font)
|
||||||
|
Loading…
Reference in New Issue
Block a user