## ## $Id$ ## ## This file is part of Vidalia, and is subject to the license terms in the ## LICENSE file, found in the top level directory of this distribution. If ## you did not receive the LICENSE file with this file, you may obtain it ## from the Vidalia source package distributed by the Vidalia Project at ## http://www.vidalia-project.net/. No part of Vidalia, including this file, ## may be copied, modified, propagated, or distributed except according to ## the terms described in the LICENSE file. ## set(VER_MAJOR "0") set(VER_MINOR "1") set(VER_PATCH "1") set(VERSION "${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}") message(STATUS "Configuring Vidalia ${VERSION}") project(Vidalia) ## Specify the minimim required CMake version cmake_minimum_required(VERSION 2.4.0) ## Require Qt >= 4.2.0 set(QT_MIN_VERSION "4.2.0") ## Specify the Qt libraries used include(FindQt4) find_package(Qt4 REQUIRED) set(QT_USE_QTNETWORK true) set(QT_USE_QTXML true) include(${QT_USE_FILE}) include(${CMAKE_SOURCE_DIR}/cmake/VidaliaMacros.cmake) include(CheckIncludeFileCXX) include(CPack) if(MSVC_IDE) set(CMAKE_SUPPRESS_REGENERATION TRUE) set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin) set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin) endif(MSVC_IDE) ## Define Vidalia-specific CMake options if (APPLE) option(OSX_FAT_BINARY "Build Vidalia as a Universal binary." OFF) endif(APPLE) ## Check for QSslSocket set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${QT_INCLUDES}) check_include_file_cxx("qsslsocket.h" HAVE_QSSLSOCKET_H) if (HAVE_QSSLSOCKET_H) check_symbol_exists(QT_NO_OPENSSL "QtGlobal" QT_NO_SSL_SUPPORT) if (NOT QT_NO_SSL_SUPPORT) option(USE_QSSLSOCKET "Use Qt's QSslSocket for GeoIP lookups." ON) endif(NOT QT_NO_SSL_SUPPORT) endif(HAVE_QSSLSOCKET_H) if (USE_QSSLSOCKET) if (MSVC OR UNIX) include(${CMAKE_SOURCE_DIR}/cmake/FindOpenSSL.cmake) endif(MSVC OR UNIX) endif(USE_QSSLSOCKET) ## Write out a configuration file configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h ) include_directories(${CMAKE_CURRENT_BINARY_DIR}) ## Add the actual source directories add_subdirectory(src) add_subdirectory(doc) add_subdirectory(pkg)