Browse Source

Get the Unix stuff to build using CMake. Based on a patch by Henrik Andersson.


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4336 3789f03b-4d11-0410-bbf8-ca57d06f2519
tags/v1.1.90
Pierre Ossman 13 years ago
parent
commit
8f64ef73b3

+ 16
- 1
CMakeLists.txt View File

@@ -15,6 +15,11 @@ set(VERSION 1.0.90)
# The RC version must always be four comma-separated numbers
set(RCVERSION 1,0,90,0)

# Compatibility variables for the migration from autotools
add_definitions(-DPACKAGE_NAME="${CMAKE_PROJECT_NAME}")
add_definitions(-DPACKAGE_VERSION="${VERSION}")
add_definitions(-DLOCALEDIR="${CMAKE_INSTALL_PREFIX}/share/locale")

# Try to encode today's date into the build id. We assume that MSVC
# means we need to use a native Windows method, otherwise we assume
# some kind of Unix system. The id will be empty if things fail.
@@ -101,6 +106,11 @@ if(MINGW)
"<CMAKE_RC_COMPILER> <FLAGS> <DEFINES> -o <OBJECT> --output-format=coff <SOURCE>")
endif()

# X11 stuff. It's in a if() so that we can say REQUIRED
if(UNIX)
find_package(X11 REQUIRED)
endif()

# Check for zlib
find_package(ZLIB)
option(USE_INCLUDED_ZLIB "Force use of the bundled zlib")
@@ -163,4 +173,9 @@ add_definitions(-DHAVE_CONFIG_H)
include_directories(${CMAKE_BINARY_DIR})

add_subdirectory(common)
add_subdirectory(win)

if(WIN32)
add_subdirectory(win)
else()
add_subdirectory(unix)
endif()

+ 5
- 0
unix/CMakeLists.txt View File

@@ -0,0 +1,5 @@
add_subdirectory(tx)

add_subdirectory(vncconfig)
add_subdirectory(vncpasswd)
add_subdirectory(vncviewer)

+ 13
- 0
unix/tx/CMakeLists.txt View File

@@ -0,0 +1,13 @@
include_directories(${X11_INCLUDE_DIR})

include_directories(${CMAKE_SOURCE_DIR}/common)
include_directories(${CMAKE_SOURCE_DIR}/common/rfb)

add_library(tx STATIC
TXWindow.cxx
TXScrollbar.cxx
TXViewport.cxx
TXImage.cxx
TXMenu.cxx)

target_link_libraries(tx ${X11_LIBRARIES})

+ 12
- 0
unix/vncconfig/CMakeLists.txt View File

@@ -0,0 +1,12 @@
include_directories(${X11_INCLUDE_DIR})

include_directories(${CMAKE_SOURCE_DIR}/common)
include_directories(${CMAKE_SOURCE_DIR}/unix/tx)

add_executable(vncconfig
buildtime.c
vncExt.c
vncconfig.cxx
QueryConnectDialog.cxx)

target_link_libraries(vncconfig tx rfb network rdr ${X11_LIBRARIES})

+ 6
- 0
unix/vncpasswd/CMakeLists.txt View File

@@ -0,0 +1,6 @@
include_directories(${CMAKE_SOURCE_DIR}/common)

add_executable(vncpasswd
vncpasswd.cxx)

target_link_libraries(vncpasswd tx rfb rdr os)

+ 13
- 0
unix/vncviewer/CMakeLists.txt View File

@@ -0,0 +1,13 @@
include_directories(${X11_INCLUDE_DIR})

include_directories(${CMAKE_SOURCE_DIR}/common)
include_directories(${CMAKE_SOURCE_DIR}/unix/tx)
include_directories(${CMAKE_SOURCE_DIR}/intl)

add_executable(vncviewer
buildtime.c
CConn.cxx
DesktopWindow.cxx
vncviewer.cxx)

target_link_libraries(vncviewer tx rfb network rdr os ${X11_LIBRARIES})

Loading…
Cancel
Save