diff options
-rw-r--r-- | CMakeLists.txt | 8 | ||||
-rw-r--r-- | cmake/StaticBuild.cmake | 8 | ||||
-rw-r--r-- | common/rfb/JpegCompressor.cxx | 2 | ||||
-rw-r--r-- | doc/keyboard-test.txt | 2 |
4 files changed, 13 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 08ef25cc..d788b602 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,12 +39,9 @@ if(MSVC) message(FATAL_ERROR "TigerVNC cannot be built with Visual Studio. Please use MinGW") endif() -set(BUILD_TIMESTAMP "") -execute_process(COMMAND "date" "+%Y-%m-%d %H:%M" OUTPUT_VARIABLE BUILD_TIMESTAMP) - if(NOT BUILD_TIMESTAMP) set(BUILD_TIMESTAMP "") -else() + execute_process(COMMAND "date" "+%Y-%m-%d %H:%M" OUTPUT_VARIABLE BUILD_TIMESTAMP) string(REGEX REPLACE "\n" "" BUILD_TIMESTAMP ${BUILD_TIMESTAMP}) endif() @@ -57,6 +54,7 @@ endif() message(STATUS "CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}") message(STATUS "VERSION = ${VERSION}") +message(STATUS "BUILD_TIMESTAMP = ${BUILD_TIMESTAMP}") add_definitions(-DBUILD_TIMESTAMP="${BUILD_TIMESTAMP}") # We want to keep our asserts even in release builds so remove NDEBUG @@ -199,6 +197,8 @@ if(NOT FOUND_LIBJPEG_TURBO) message(STATUS "WARNING: You are not using libjpeg-turbo. Performance will suffer.") endif() +include_directories(${JPEG_INCLUDE_DIR}) + option(BUILD_JAVA "Build Java version of the TigerVNC Viewer" FALSE) if(BUILD_JAVA) add_subdirectory(java) diff --git a/cmake/StaticBuild.cmake b/cmake/StaticBuild.cmake index 25c10777..5a3d9987 100644 --- a/cmake/StaticBuild.cmake +++ b/cmake/StaticBuild.cmake @@ -10,9 +10,14 @@ option(BUILD_STATIC "Link statically against most libraries, if possible" OFF) +option(BUILD_STATIC_GCC + "Link statically against only libgcc and libstdc++" OFF) + if(BUILD_STATIC) message(STATUS "Attempting to link static binaries...") + set(BUILD_STATIC_GCC 1) + set(JPEG_LIBRARIES "-Wl,-Bstatic -ljpeg -Wl,-Bdynamic") if(WIN32) @@ -105,7 +110,9 @@ if(BUILD_STATIC) set(X11_Xdamage_LIB "-Wl,-Bstatic -lXdamage -Wl,-Bdynamic") endif() endif() +endif() +if(BUILD_STATIC_GCC) # This ensures that we don't depend on libstdc++ or libgcc_s set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -nodefaultlibs") set(STATIC_BASE_LIBRARIES "-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic") @@ -122,5 +129,4 @@ if(BUILD_STATIC) set(STATIC_BASE_LIBRARIES "${STATIC_BASE_LIBRARIES} -lgcc -lgcc_eh -lc") endif() set(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} ${STATIC_BASE_LIBRARIES}") - endif() diff --git a/common/rfb/JpegCompressor.cxx b/common/rfb/JpegCompressor.cxx index 5df0039e..c8bf8410 100644 --- a/common/rfb/JpegCompressor.cxx +++ b/common/rfb/JpegCompressor.cxx @@ -94,7 +94,7 @@ JpegEmptyOutputBuffer(j_compress_ptr cinfo) JPEG_DEST_MGR *dest = (JPEG_DEST_MGR *)cinfo->dest; JpegCompressor *jc = dest->instance; - jc->setptr(dest->pub.next_output_byte); + jc->setptr(jc->getend()); jc->overrun(jc->getend() - jc->getstart(), 1); dest->pub.next_output_byte = jc->getptr(); dest->pub.free_in_buffer = jc->getend() - jc->getptr(); diff --git a/doc/keyboard-test.txt b/doc/keyboard-test.txt index d59499f7..800faeca 100644 --- a/doc/keyboard-test.txt +++ b/doc/keyboard-test.txt @@ -43,7 +43,7 @@ Client - Alt, AltGr, Super [Win, X11] (FIXME: AltGr broken on Win) - Left/right identification (FIXME: broken for Shift on Win) - CmdL => AltL, CmdR => SuperL, AltL => ModeSwitch, AltR => Level3Shift [Mac] - - Meta and Hyper sends Super [X11] + - Hyper sends Super [X11] - CapsLock, Shift and AltGr affect symbol lookup - NumLock affects symbol lookup [Win, X11] |