Skip to content

spirit-fhs/libspirit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

                       _ _ _               _      _ _   
                      | (_) |__  ___ _ __ (_)_ __(_) |_ 
                      | | | '_ \/ __| '_ \| | '__| | __|
                      | | | |_) \__ \ |_) | | |  | | |_ 
                      |_|_|_.__/|___/ .__/|_|_|  |_|\__|
                                    |_|                 
        


README
  It is better to light a candle than to curse the darkness.
  
DEPENDENCIES
  Libspirit needs the OpenSSL development libraries for supporting the HTTPS
  protocol.
  
  On the most Unix systems you can get this by using your package manager e.g.:
    Ubuntu:  sudo apt-get install libssl-dev
    Gentoo:  sudo emerge dev-libs/openssl
      
  On Windows the most simple way to install OpenSSL is to download the
  installer here:
    http://www.slproweb.com/products/Win32OpenSSL.html
  Download and install the "Win32 OpenSSL v<actual version>" but not the one
  with "Light" as suffix. Its recommended to use the default installation
  settings and location to ensure CMake can find OpenSSL.
  
  On Mac OS X 
  
BUILD ON WINDOWS WITH MSVC
  Start your console and enter
      cmake --help
  to print a list of generators available on your system. You should pick
  something like "Visual Studio 10" in step 3 of the following steps:
  
  1. mkdir build
  2. cd build
  3. cmake -G "Visual Studio 10" ..
  4. devenv libspirit.sln /project ALL_BUILD /build Release

BUILD ON UNIX WITH AUTOTOOLS AND GCC
  Follow these steps:
  
  1. mkdir build
  2. cd build
  3. cmake -G "Unix Makefiles" ./../
  4. make
  
BUILD ON MAC OS X
  You need cmake and Xcode to be installed. If you got this you can follow
  these steps:
  
  1. mkdir build
  2. cd build
  3. cmake -G "Unix Makefiles" ..
  4. make
  
  ... or you can build libspirit using Apple's Xcode
  
  1. mkdir build
  2. cd build
  3. cmake -G "Xcode" ..
  4. open the file "libspirit.xcodeproj" in Xcode and build ALL_BUILD
  
WHAT CHANGES HAPPENED TO CURL AND YAJL?
  There a nearly no changes but we need to add the compiler flag -fPIC to
  compile on Unix x64 systems. The following modifications are done:
  
      yajl/src/CMakeLists.txt around line 28:
      
          ADD_DEFINITIONS(-DYAJL_BUILD -fPIC)  #HACK added -fPIC
          
      curl/lib/CMakeLists.txt around line 100:
      
          if(WIN32)
            add_definitions( -D_USRDLL )
          else() #HACK
            add_definitions ( -fPIC ) #HACK
          endif()
          
  Finally we need to tweak the search for OpenSSL on Windows:
          
      curl/CMakeLists.txt around line 256:
      
          if(CMAKE_USE_OPENSSL)
              if(WIN32)
                find_package(OpenSSL)
                if(OPENSSL_FOUND OR
                  (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES))
                  message(STATUS "Found OpenSSL!")
                  set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES}
                    ${OPENSSL_INCLUDE_DIR})
                  include_directories(${OPENSSL_INCLUDE_DIR})