2012-09-08 02:50:37 +00:00
|
|
|
PROJECT( fc )
|
|
|
|
|
|
|
|
|
|
CMAKE_MINIMUM_REQUIRED( VERSION 2.8.0 )
|
|
|
|
|
|
|
|
|
|
SET( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeModules;${CMAKE_MODULE_PATH}" )
|
|
|
|
|
|
|
|
|
|
INCLUDE( VersionMacros )
|
|
|
|
|
INCLUDE( SetupTargetMacros )
|
|
|
|
|
|
|
|
|
|
SET( DEFAULT_HEADER_INSTALL_DIR include/\${target} )
|
|
|
|
|
SET( DEFAULT_LIBRARY_INSTALL_DIR lib/ )
|
|
|
|
|
SET( DEFAULT_EXECUTABLE_INSTALL_DIR bin/ )
|
|
|
|
|
SET( CMAKE_DEBUG_POSTFIX _debug )
|
|
|
|
|
#SET( BUILD_SHARED_LIBS NO )
|
|
|
|
|
|
|
|
|
|
SET(Boost_USE_STATIC_LIBS ON)
|
2012-09-08 02:57:00 +00:00
|
|
|
FIND_PACKAGE(Boost 1.51 COMPONENTS thread date_time system filesystem program_options signals serialization chrono unit_test_framework context )
|
2012-09-08 02:50:37 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR} )
|
|
|
|
|
LINK_DIRECTORIES( ${Boost_LIBRARY_DIRS} )
|
|
|
|
|
|
|
|
|
|
IF( WIN32 )
|
|
|
|
|
ADD_DEFINITIONS( -DBOOST_CONTEXT_NO_LIB )
|
|
|
|
|
ADD_DEFINITIONS( -D_SCL_SECURE_NO_WARNINGS )
|
|
|
|
|
ADD_DEFINITIONS( -D_WIN32_WINNT=0x0501 )
|
|
|
|
|
ADD_DEFINITIONS( -D_CRT_SECURE_NO_WARNINGS )
|
|
|
|
|
ELSE(WIN32)
|
|
|
|
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -Wall")
|
|
|
|
|
ENDIF(WIN32)
|
|
|
|
|
|
|
|
|
|
if( UNIX )
|
|
|
|
|
if( NOT APPLE )
|
|
|
|
|
set(rt_library rt )
|
|
|
|
|
set(pthread_library pthread)
|
|
|
|
|
endif()
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
option( UNITY_BUILD OFF )
|
|
|
|
|
|
2012-10-26 05:03:47 +00:00
|
|
|
include_directories( vendor/boost/process/include )
|
2012-09-08 02:50:37 +00:00
|
|
|
include_directories( ${Boost_INCLUDE_DIR} )
|
2012-10-29 20:19:17 +00:00
|
|
|
include_directories( ${OPENSSL_INCLUDE_DIR} )
|
2012-09-08 02:50:37 +00:00
|
|
|
include_directories( include )
|
|
|
|
|
|
|
|
|
|
set( sources
|
2012-11-01 04:23:06 +00:00
|
|
|
src/ssh.cpp
|
2012-10-26 05:03:47 +00:00
|
|
|
src/process.cpp
|
2012-10-24 04:54:03 +00:00
|
|
|
src/http_connection.cpp
|
2012-10-26 05:03:47 +00:00
|
|
|
src/json_rpc_connection.cpp
|
2012-10-29 23:50:49 +00:00
|
|
|
src/json_rpc_stream_connection.cpp
|
2012-11-06 04:34:58 +00:00
|
|
|
src/json_rpc_tcp_connection.cpp
|
|
|
|
|
src/json_rpc_tcp_server.cpp
|
2012-10-21 06:28:59 +00:00
|
|
|
src/value.cpp
|
|
|
|
|
src/lexical_cast.cpp
|
2012-09-08 02:50:37 +00:00
|
|
|
src/spin_lock.cpp
|
|
|
|
|
src/spin_yield_lock.cpp
|
|
|
|
|
src/task.cpp
|
|
|
|
|
src/future.cpp
|
|
|
|
|
src/shared_ptr.cpp
|
|
|
|
|
src/string.cpp
|
|
|
|
|
src/json.cpp
|
|
|
|
|
src/log.cpp
|
|
|
|
|
src/time.cpp
|
2012-10-21 06:28:59 +00:00
|
|
|
src/iostream.cpp
|
|
|
|
|
src/sstream.cpp
|
2012-09-08 02:50:37 +00:00
|
|
|
src/exception.cpp
|
|
|
|
|
src/thread.cpp
|
2012-09-08 06:41:28 +00:00
|
|
|
src/hex.cpp
|
|
|
|
|
src/sha1.cpp
|
2012-09-08 21:37:25 +00:00
|
|
|
src/filesystem.cpp
|
|
|
|
|
src/ip.cpp
|
|
|
|
|
src/bigint.cpp
|
|
|
|
|
src/mutex.cpp
|
2012-09-09 03:46:19 +00:00
|
|
|
src/pke.cpp
|
|
|
|
|
src/base64.cpp
|
2012-09-30 21:01:14 +00:00
|
|
|
src/base58.cpp
|
2012-09-11 00:15:35 +00:00
|
|
|
src/blowfish.cpp
|
|
|
|
|
src/dh.cpp
|
2012-09-09 03:46:19 +00:00
|
|
|
src/udp_socket.cpp
|
2012-09-27 23:48:48 +00:00
|
|
|
src/tcp_socket.cpp
|
2012-09-09 04:25:43 +00:00
|
|
|
src/asio.cpp
|
2012-09-11 00:15:35 +00:00
|
|
|
src/super_fast_hash.cpp
|
2012-09-18 03:04:42 +00:00
|
|
|
src/file_mapping.cpp
|
2012-10-21 06:28:59 +00:00
|
|
|
# src/program_options.cpp
|
2012-09-08 02:50:37 +00:00
|
|
|
)
|
2012-11-01 04:23:06 +00:00
|
|
|
|
|
|
|
|
add_subdirectory(vendor/libssh2-1.4.2)
|
|
|
|
|
|
2012-09-08 02:50:37 +00:00
|
|
|
setup_library( fc SOURCES ${sources} )
|
|
|
|
|
|
2012-10-29 20:19:17 +00:00
|
|
|
setup_executable( json_rpc_test SOURCES tests/json_rpc_test.cpp LIBRARIES fc ${pthread_library} ${rt_library} ${Boost_THREAD_LIBRARY} ${Boost_CONTEXT_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_CHRONO_LIBRARY} ${Boost_FILESYSTEM_LIBRARY} ${rt_library} )
|
2012-10-26 05:03:47 +00:00
|
|
|
|
2012-09-08 02:57:00 +00:00
|
|
|
#add_executable( test_vec tests/vector_test.cpp )
|
|
|
|
|
#target_link_libraries( test_vec fc ${Boost_SYSTEM_LIBRARY} ${Boost_CHRONO_LIBRARY} ${Boost_THREAD_LIBRARY} ${Boost_CONTEXT_LIBRARY} )
|
2012-09-08 02:50:37 +00:00
|
|
|
|
2012-09-08 06:41:28 +00:00
|
|
|
#add_executable( unit_tests tests/unit.cpp )
|
|
|
|
|
#target_link_libraries( unit_tests fc ${Boost_CHRONO_LIBRARY} ${Boost_THREAD_LIBRARY} ${Boost_CONTEXT_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} )
|