Commit 6ca2d2e2 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[CHANGE] - now fonts also get copied to share/OpenWalnut during make

parent 63baddcf
......@@ -157,7 +157,7 @@ endif( OW_COPY_SHADERS )
#---------- fonts -------------
add_custom_target( fontsDirectoryConfiguration
ALL
COMMAND ${CMAKE_COMMAND} -D OW_SOURCE_DIR:STRING=${PROJECT_SOURCE_DIR} -P ${PROJECT_SOURCE_DIR}/../tools/CMakeModules/CopyFonts.cmake
COMMAND ${CMAKE_COMMAND} -D OW_SOURCE_DIR:STRING=${PROJECT_SOURCE_DIR} -D SHARED_FILES_RELATIVE:PATH=${SHARED_FILES_RELATIVE} -P ${PROJECT_SOURCE_DIR}/../tools/CMakeModules/CopyFonts.cmake
COMMENT "Put all fonts to the right place."
)
......
......@@ -215,7 +215,7 @@ void WKernel::findAppPath()
WLogger::getLogger()->addLogMessage( "Shader path: " + m_shaderPath.file_string(), "Kernel", LL_DEBUG );
// NOTE: currently, OpenSceneGraph has hard-coded its search path for fonts. So we can't change it to somewhere else currently.
m_fontPath = boost::filesystem::path( m_appPath / "fonts" );
m_fontPath = boost::filesystem::path( m_appPath / W_SHARED_FILES_RELATIVE / "fonts" );
WLogger::getLogger()->addLogMessage( "Font path: " + m_fontPath.file_string(), "Kernel", LL_DEBUG );
// the module path. use WSharedLib to find it basing on the bin- dir
......
# this is a script that puts all fonts to the right place
#--------------------------------------------------------------------
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/bin/fonts)
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/bin/${SHARED_FILES_RELATIVE}/fonts)
FILE( GLOB_RECURSE ALL_GE_FONTS ${OW_SOURCE_DIR}/graphicsEngine/fonts/* )
FOREACH( fname ${ALL_GE_FONTS} )
#message( ${fname} )
configure_file( ${fname} ${CMAKE_BINARY_DIR}/bin/fonts/ COPYONLY)
ENDFOREACH( fname )
\ No newline at end of file
configure_file( ${fname} ${CMAKE_BINARY_DIR}/bin/${SHARED_FILES_RELATIVE}/fonts/ COPYONLY)
ENDFOREACH( fname )
# this is kind of a hack as the osgViewer::StatsHandler does not allow us to change the font path -> copy the file he needs to the destination he
# needs
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/bin/fonts)
configure_file( ${OW_SOURCE_DIR}/graphicsEngine/fonts/arial.ttf ${CMAKE_BINARY_DIR}/bin/fonts/ COPYONLY)
......@@ -5,16 +5,13 @@
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/bin/${SHARED_FILES_RELATIVE}/shaders)
FILE( GLOB_RECURSE ALL_GE_SHADERS ${OW_SOURCE_DIR}/graphicsEngine/shaders/* )
FOREACH( fname ${ALL_GE_SHADERS} )
#message( ${fname} )
configure_file( ${fname} ${CMAKE_BINARY_DIR}/bin/${SHARED_FILES_RELATIVE}/shaders/ COPYONLY)
ENDFOREACH( fname )
FILE( GLOB_RECURSE ALL_MODULE_SHADERS ${OW_SOURCE_DIR}/modules/*/shaders/* )
FOREACH( fname ${ALL_MODULE_SHADERS} )
message( WARNING ${SHARED_FILES_RELATIVE} )
configure_file( ${fname} ${CMAKE_BINARY_DIR}/bin/${SHARED_FILES_RELATIVE}/shaders/ COPYONLY)
ENDFOREACH( fname )
FILE( GLOB_RECURSE ALL_KERNELMODULE_SHADERS ${OW_SOURCE_DIR}/kernel/modules/*/shaders/* )
FOREACH( fname ${ALL_KERNELMODULE_SHADERS} )
#message( ${fname} )
configure_file( ${fname} ${CMAKE_BINARY_DIR}/bin/${SHARED_FILES_RELATIVE}/shaders/ COPYONLY)
ENDFOREACH( fname )
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