Commit 5f0fd5cb authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

Adding support to build freetype on Windows.

Freetype is needed by matplotlib on Windows.

Change-Id: I460ebf91dd4078077cd351fd7c0379c05b175f5d
parent 08c99479
......@@ -125,6 +125,14 @@ if (WIN32)
find_program(NMAKE_PATH nmake)
mark_as_advanced(DEVENV_PATH NMAKE_PATH)
endif()
# Freetype uses its own build system on win32...
find_program(FTJAM_EXECUTABLE jam)
mark_as_advanced(FTJAM_EXECUTABLE)
if (freetype_ENABLED)
if (NOT FTJAM_EXECUTABLE)
message(FATAL_ERROR "FreeType's 'jam' build tool not found! Download it from http://sourceforge.net/projects/freetype/files/ftjam/2.5.2/ and set FTJAM_EXECUTABLE appropriately.")
endif()
endif()
endif()
#-----------------------------------------------------------------------------
include (ParaViewModules)
......@@ -145,6 +153,7 @@ set (CM_PROJECTS_ALL)
# Some of these allow using system libraries too.
include(boost)
include(cgns)
include(freetype)
include(hdf5)
include(libxml2)
include(manta)
......@@ -159,11 +168,6 @@ include(szip)
include(visitbridge)
include(zlib)
if (UNIX OR APPLE)
# since currently, freetype is not supported in windows. It will be soon.
include(freetype)
endif()
if (UNIX AND NOT APPLE)
include(ffmpeg)
include(fontconfig)
......
set(ENV{JAM_TOOLSET} VISUALC)
execute_process(COMMAND ${FTJAM_EXECUTABLE}
WORKING_DIRECTORY ${WORKING_DIRECTORY})
execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_if_different
"${SOURCE_DIR}/objs/freetype.lib"
"${INSTALL_DIR}/lib/freetype.lib"
)
execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory
"${SOURCE_DIR}/include"
"${INSTALL_DIR}/include/freetype2"
)
add_external_project(
freetype
DEPENDS zlib
CONFIGURE_COMMAND ""
BUILD_IN_SOURCE 1
BUILD_COMMAND
${CMAKE_COMMAND}
-DFTJAM_EXECUTABLE:PATH=${FTJAM_EXECUTABLE}
-DWORKING_DIRECTORY:PATH=<SOURCE_DIR>
-P ${SuperBuild_PROJECTS_DIR}/win32/freetype-build.cmake
INSTALL_COMMAND
${CMAKE_COMMAND}
-DSOURCE_DIR:PATH=<SOURCE_DIR>
-DINSTALL_DIR:PATH=<INSTALL_DIR>
-P ${SuperBuild_PROJECTS_DIR}/win32/freetype-install.cmake
)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment