From 01b48115c9fa45eebd138f91fbd343fba7bed3b4 Mon Sep 17 00:00:00 2001 From: hobbes1069 Date: Tue, 7 May 2013 14:13:02 +0000 Subject: [PATCH] Fix typo in cmake config, add README.cmake. git-svn-id: https://svn.code.sf.net/p/freetel/code@1243 01035d8c-6547-0410-b346-abe4f91aad63 --- fdmdv2/CMakeLists.txt | 4 ++-- fdmdv2/README.cmake | 24 ++++++++++++++++++++++++ fdmdv2/cmake/BuildWxWidgets.cmake | 15 +++++++++++++++ 3 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 fdmdv2/README.cmake create mode 100644 fdmdv2/cmake/BuildWxWidgets.cmake diff --git a/fdmdv2/CMakeLists.txt b/fdmdv2/CMakeLists.txt index 5b59e3e4..284755d4 100644 --- a/fdmdv2/CMakeLists.txt +++ b/fdmdv2/CMakeLists.txt @@ -37,7 +37,7 @@ message(STATUS "FreeDV version: ${FREEDV_VERSION}") #set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) # Work around for not using a svn working copy. -add_definitions(-DSVN_REVISION="1239") +add_definitions(-DSVN_REVISION="1238") # Set default build flags. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") @@ -277,7 +277,7 @@ if(NOT USE_STATIC_CODEC2) Linux: Codec2 may not be in your distribution so build yourself or use the cmake option to build statically into FreeDV. Windws: -It's easiest to use the cmake option: USE_STATIC_PORTAUDIO" +It's easiest to use the cmake option: USE_STATIC_CODEC2" ) endif(CODEC2_INCLUDE_DIR AND CODEC2_LIBRARY) else(NOT USE_STATIC_CODEC2) diff --git a/fdmdv2/README.cmake b/fdmdv2/README.cmake new file mode 100644 index 00000000..26495c59 --- /dev/null +++ b/fdmdv2/README.cmake @@ -0,0 +1,24 @@ +The CMake configuration for FDMDV2 (FreeDV) should be considered experimental at +this time but has been thouroughly tested on Fedora Linux and will likely work +well on most *nix systems and has many advanages over the autotools config. + +- Builds against system libraries (default). +- Or optionally download, build, and statically link with required libraries on + an individual basis. See USE_STATIC_??? options. +- Has experimental NSIS packaing support for Windows (WIN32) targets. *nix + systems should rely on 'make install' as the packages (RPM & DEB) created by + CPack are questionable. + + To test the cmake build make a directory anywhere underneath (or outside of) +the source directory. + +Linux command line example: + +$ cd /path/to/fdmdv2 +$ mkdir build_linux +$ cd build_linux +$ cmake ../ (defaults to /usr/local, use CMAKE_INSTALL_PREFIX to override) +(if no errors) +$ make +(as root) +$ make install diff --git a/fdmdv2/cmake/BuildWxWidgets.cmake b/fdmdv2/cmake/BuildWxWidgets.cmake new file mode 100644 index 00000000..5bee2a56 --- /dev/null +++ b/fdmdv2/cmake/BuildWxWidgets.cmake @@ -0,0 +1,15 @@ +set(WXWIDGETS_TARBALL "wxWidgets-2.9.4") + +include(ExternalProject) +ExternalProject_Add(wxWidgets + URL http://downloads.sourceforge.net/wxwindows/${WXWIDGETS_TARBALL}.tar.bz2 + BUILD_IN_SOURCE 1 + INSTALL_DIR external/dist + CONFIGURE_COMMAND ./configure --disable-shared --prefix=${CMAKE_BINARY_DIR}/external/dist + BUILD_COMMAND $(MAKE) + INSTALL_COMMAND $(MAKE) install +) +set(WXCONFIG "${CMAKE_BINARY_DIR}/external/dist/bin/wx-config") +set(WXRC "${CMAKE_BINARY_DIR}/external/dist/bin/wxrc") +list(APPEND FREEDV_LINK_LIBS ${wxWidgets_LIBRARIES}) +list(APPEND FREEDV_STATIC_DEPS wxWidgets) -- 2.25.1