#To make a solution file to navigate the harfbuzz source code from the Visual Studio GUI: #xcopy /S c:\work\osd\harfbuzz\0.9.40\patch\*.* c:\work\harfbuzz-0.9.40 #cmake -G "Visual Studio 10" -DCMAKE_INSTALL_PREFIX=c:\work\local c:\work\harfbuzz-0.9.40 project (harfbuzz) cmake_minimum_required (VERSION 2.8) #Import the ragel tool to be used by ragel_gen() #It must have been built from source in a previous step and exported to #tool/ragel.cmake by install(TARGETS ... EXPORT tool/ragel.cmake) find_file (IMPORT_RAGEL "tool/ragel.cmake") if (IMPORT_RAGEL) message (FATAL_ERROR "Could not find tool/ragel.cmake. Build the ragel tool first.") else (IMPORT_RAGEL) include (${IMPORT_RAGEL}) endif (IMPORT_RAGEL) #The ragel tool is now available for use with add_custom_command() as tool-ragel. function(ragel_gen in_rl) add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${in_rl}.cpp COMMAND tool-ragel -G2 -o ${CMAKE_CURRENT_BINARY_DIR}/${in_rl}.cpp ${CMAKE_CURRENT_SOURCE_DIR}/${in_rl}.rl -I ${CMAKE_CURRENT_SOURCE_DIR} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${in_rl}.rl ) endfunction(ragel_gen) #A ragel source file named file.rl can now be added to the project by ragel_gen(file) #to ensure that a file ${CMAKE_CURRENT_BINARY_DIR}/file.cpp is generated. add_subdirectory (src)