From 948ff02eb996df501ce83bde9919e8e338bf95ab Mon Sep 17 00:00:00 2001 From: Dennis Rieks Date: Sun, 12 Feb 2012 15:38:55 +0100 Subject: [PATCH 1/2] ppmrenderer win32 patch --- demo/ppmrender/ppmmain.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/demo/ppmrender/ppmmain.cpp b/demo/ppmrender/ppmmain.cpp index a46280c..16f07ca 100644 --- a/demo/ppmrender/ppmmain.cpp +++ b/demo/ppmrender/ppmmain.cpp @@ -109,9 +109,19 @@ class TestDelegate : public WindowDelegate { FILE *outfile; { std::ostringstream os; - os << "/tmp/chromium_render_" << time(NULL) << "_" << (call_count++) << ".ppm"; + os << +#ifdef _WIN32 + getenv("TEMP") << "\\" +#else + "/tmp/" +#endif + << "chromium_render_" << time(NULL) << "_" << (call_count++) << ".ppm"; std::string str (os.str()); outfile = fopen(str.c_str(), "wb"); + if(outfile == NULL) { + std::cout << "*** cant open file "< Date: Mon, 13 Feb 2012 10:16:18 -0800 Subject: [PATCH 2/2] Add binary directory rpath setting for ppmrender so you don't need to use LD_LIBRARY_PATH on Linux when running in-tree. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 538fe29..2c702ac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -146,7 +146,7 @@ IF(CHROME_FOUND) IF(BERKELIUM_BUILD_DEMOS) ADD_EXECUTABLE(ppmrender ${BERKELIUM_TOP_LEVEL}/demo/ppmrender/ppmmain.cpp) TARGET_LINK_LIBRARIES(ppmrender ${BERKELIUM_LINK_LIBS}) - SET_TARGET_PROPERTIES(ppmrender PROPERTIES LINK_FLAGS "${BERKELIUM_LDFLAGS}") + SET_TARGET_PROPERTIES(ppmrender PROPERTIES LINK_FLAGS "${BERKELIUM_LDFLAGS} -Wl,-rpath,${CMAKE_CURRENT_BINARY_DIR}") SET_TARGET_PROPERTIES(ppmrender PROPERTIES SKIP_BUILD_RPATH ON) ADD_DEPENDENCIES(ppmrender libberkelium) IF(APPLE)