diff options
author | Pierre Ossman <ossman@cendio.se> | 2011-03-08 16:32:49 +0000 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2011-03-08 16:32:49 +0000 |
commit | 8f64ef73b3b39191c66b202eea4299c36741ed15 (patch) | |
tree | 1972612dc0ce67c26950c14010972e3a76b77af6 | |
parent | 7c1d6ced0ee6dee94404816e8c968f90eebd9086 (diff) | |
download | tigervnc-8f64ef73b3b39191c66b202eea4299c36741ed15.tar.gz tigervnc-8f64ef73b3b39191c66b202eea4299c36741ed15.zip |
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
-rw-r--r-- | CMakeLists.txt | 17 | ||||
-rw-r--r-- | unix/CMakeLists.txt | 5 | ||||
-rw-r--r-- | unix/tx/CMakeLists.txt | 13 | ||||
-rw-r--r-- | unix/vncconfig/CMakeLists.txt | 12 | ||||
-rw-r--r-- | unix/vncpasswd/CMakeLists.txt | 6 | ||||
-rw-r--r-- | unix/vncviewer/CMakeLists.txt | 13 |
6 files changed, 65 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 58bb224c..83926e7a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() diff --git a/unix/CMakeLists.txt b/unix/CMakeLists.txt new file mode 100644 index 00000000..176fad36 --- /dev/null +++ b/unix/CMakeLists.txt @@ -0,0 +1,5 @@ +add_subdirectory(tx) + +add_subdirectory(vncconfig) +add_subdirectory(vncpasswd) +add_subdirectory(vncviewer) diff --git a/unix/tx/CMakeLists.txt b/unix/tx/CMakeLists.txt new file mode 100644 index 00000000..ab46f03c --- /dev/null +++ b/unix/tx/CMakeLists.txt @@ -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}) diff --git a/unix/vncconfig/CMakeLists.txt b/unix/vncconfig/CMakeLists.txt new file mode 100644 index 00000000..55704130 --- /dev/null +++ b/unix/vncconfig/CMakeLists.txt @@ -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}) diff --git a/unix/vncpasswd/CMakeLists.txt b/unix/vncpasswd/CMakeLists.txt new file mode 100644 index 00000000..1125df25 --- /dev/null +++ b/unix/vncpasswd/CMakeLists.txt @@ -0,0 +1,6 @@ +include_directories(${CMAKE_SOURCE_DIR}/common) + +add_executable(vncpasswd + vncpasswd.cxx) + +target_link_libraries(vncpasswd tx rfb rdr os) diff --git a/unix/vncviewer/CMakeLists.txt b/unix/vncviewer/CMakeLists.txt new file mode 100644 index 00000000..0a292680 --- /dev/null +++ b/unix/vncviewer/CMakeLists.txt @@ -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}) |