winlin

add cmakelists.txt for cmake for clion of jetbrains. 0.9.214

  1 +cmake_minimum_required(VERSION 2.6.4)
  2 +project(srs CXX)
  3 +
  4 +INCLUDE_DIRECTORIES(objs objs/st objs/hp src/core src/kernel src/rtmp src/app)
  5 +
  6 +set(SOURCE_FILES src/main/srs_main_server.cpp)
  7 +AUX_SOURCE_DIRECTORY(src/core SOURCE_FILES)
  8 +AUX_SOURCE_DIRECTORY(src/kernel SOURCE_FILES)
  9 +AUX_SOURCE_DIRECTORY(src/rtmp SOURCE_FILES)
  10 +AUX_SOURCE_DIRECTORY(src/app SOURCE_FILES)
  11 +
  12 +ADD_EXECUTABLE(srs ${SOURCE_FILES})
  13 +TARGET_LINK_LIBRARIES(srs dl)
  14 +TARGET_LINK_LIBRARIES(srs ${PROJECT_SOURCE_DIR}/objs/st/libst.a)
  15 +TARGET_LINK_LIBRARIES(srs ${PROJECT_SOURCE_DIR}/objs/openssl/lib/libssl.a)
  16 +TARGET_LINK_LIBRARIES(srs ${PROJECT_SOURCE_DIR}/objs/openssl/lib/libcrypto.a)
  17 +TARGET_LINK_LIBRARIES(srs ${PROJECT_SOURCE_DIR}/objs/hp/libhttp_parser.a)
  18 +
  19 +IF(NOT EXISTS ${PROJECT_SOURCE_DIR}/objs/st/libst.a)
  20 + MESSAGE("srs_libs not found")
  21 + EXEC_PROGRAM(./configure)
  22 +ENDIF(NOT EXISTS ${PROJECT_SOURCE_DIR}/objs/st/libst.a)
  23 +
  24 +MESSAGE(STATUS "only for jetbrains IDE, @see https://github.com/winlinvip/simple-rtmp-server/wiki/IDE#jetbrains")
  25 +MESSAGE(STATUS "only for jetbrains IDE, @see https://github.com/winlinvip/simple-rtmp-server/wiki/IDE#jetbrains")
  26 +MESSAGE(STATUS "only for jetbrains IDE, @see https://github.com/winlinvip/simple-rtmp-server/wiki/IDE#jetbrains")
  27 +MESSAGE(STATUS "only for jetbrains IDE, @see https://github.com/winlinvip/simple-rtmp-server/wiki/IDE#jetbrains")
  28 +MESSAGE(STATUS "only for jetbrains IDE, @see https://github.com/winlinvip/simple-rtmp-server/wiki/IDE#jetbrains")
  29 +MESSAGE(STATUS "only for jetbrains IDE, @see https://github.com/winlinvip/simple-rtmp-server/wiki/IDE#jetbrains")
  30 +MESSAGE(STATUS "only for jetbrains IDE, @see https://github.com/winlinvip/simple-rtmp-server/wiki/IDE#jetbrains")
  31 +MESSAGE(STATUS "only for jetbrains IDE, @see https://github.com/winlinvip/simple-rtmp-server/wiki/IDE#jetbrains")
  32 +MESSAGE(STATUS "only for jetbrains IDE, @see https://github.com/winlinvip/simple-rtmp-server/wiki/IDE#jetbrains")
  33 +MESSAGE(STATUS "only for jetbrains IDE, @see https://github.com/winlinvip/simple-rtmp-server/wiki/IDE#jetbrains")
  34 +MESSAGE(STATUS "only for jetbrains IDE, @see https://github.com/winlinvip/simple-rtmp-server/wiki/IDE#jetbrains")
  35 +MESSAGE(STATUS "only for jetbrains IDE, @see https://github.com/winlinvip/simple-rtmp-server/wiki/IDE#jetbrains")
  36 +MESSAGE(STATUS "only for jetbrains IDE, @see https://github.com/winlinvip/simple-rtmp-server/wiki/IDE#jetbrains")
  37 +MESSAGE(STATUS "only for jetbrains IDE, @see https://github.com/winlinvip/simple-rtmp-server/wiki/IDE#jetbrains")
  38 +MESSAGE(STATUS "only for jetbrains IDE, @see https://github.com/winlinvip/simple-rtmp-server/wiki/IDE#jetbrains")
  39 +MESSAGE(STATUS "only for jetbrains IDE, @see https://github.com/winlinvip/simple-rtmp-server/wiki/IDE#jetbrains")
  40 +MESSAGE(STATUS "only for jetbrains IDE, @see https://github.com/winlinvip/simple-rtmp-server/wiki/IDE#jetbrains")
  41 +MESSAGE(STATUS "only for jetbrains IDE, @see https://github.com/winlinvip/simple-rtmp-server/wiki/IDE#jetbrains")
  42 +MESSAGE(STATUS "only for jetbrains IDE, @see https://github.com/winlinvip/simple-rtmp-server/wiki/IDE#jetbrains")
  43 +MESSAGE(STATUS "only for jetbrains IDE, @see https://github.com/winlinvip/simple-rtmp-server/wiki/IDE#jetbrains")
  44 +MESSAGE(STATUS "only for jetbrains IDE, @see https://github.com/winlinvip/simple-rtmp-server/wiki/IDE#jetbrains")
  45 +MESSAGE(STATUS "only for jetbrains IDE, @see https://github.com/winlinvip/simple-rtmp-server/wiki/IDE#jetbrains")
  46 +MESSAGE(STATUS "only for jetbrains IDE, @see https://github.com/winlinvip/simple-rtmp-server/wiki/IDE#jetbrains")
  47 +MESSAGE(STATUS "only for jetbrains IDE, @see https://github.com/winlinvip/simple-rtmp-server/wiki/IDE#jetbrains")
  48 +MESSAGE(STATUS "only for jetbrains IDE, @see https://github.com/winlinvip/simple-rtmp-server/wiki/IDE#jetbrains")
  49 +MESSAGE(STATUS "only for jetbrains IDE, @see https://github.com/winlinvip/simple-rtmp-server/wiki/IDE#jetbrains")
@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 // current release version 31 // current release version
32 #define VERSION_MAJOR "0" 32 #define VERSION_MAJOR "0"
33 #define VERSION_MINOR "9" 33 #define VERSION_MINOR "9"
34 -#define VERSION_REVISION "213" 34 +#define VERSION_REVISION "214"
35 #define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION 35 #define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
36 // server info. 36 // server info.
37 #define RTMP_SIG_SRS_KEY "SRS" 37 #define RTMP_SIG_SRS_KEY "SRS"
@@ -55,7 +55,10 @@ ISrsThreadContext* _srs_context = new SrsThreadContext(); @@ -55,7 +55,10 @@ ISrsThreadContext* _srs_context = new SrsThreadContext();
55 SrsConfig* _srs_config = new SrsConfig(); 55 SrsConfig* _srs_config = new SrsConfig();
56 SrsServer* _srs_server = new SrsServer(); 56 SrsServer* _srs_server = new SrsServer();
57 57
58 -void show_features() 58 +/**
  59 +* show the features by macro, the actual macro values.
  60 +*/
  61 +void show_macro_features()
59 { 62 {
60 #ifdef SRS_AUTO_SSL 63 #ifdef SRS_AUTO_SSL
61 srs_trace("rtmp handshake: on"); 64 srs_trace("rtmp handshake: on");
@@ -130,11 +133,13 @@ void show_features() @@ -130,11 +133,13 @@ void show_features()
130 #endif 133 #endif
131 } 134 }
132 135
133 -// main entrance. 136 +/**
  137 +* main entrance.
  138 +*/
134 int main(int argc, char** argv) 139 int main(int argc, char** argv)
135 { 140 {
136 int ret = ERROR_SUCCESS; 141 int ret = ERROR_SUCCESS;
137 - 142 +
138 // TODO: support both little and big endian. 143 // TODO: support both little and big endian.
139 srs_assert(srs_is_little_endian()); 144 srs_assert(srs_is_little_endian());
140 145
@@ -180,7 +185,7 @@ int main(int argc, char** argv) @@ -180,7 +185,7 @@ int main(int argc, char** argv)
180 srs_trace("conf: %s, limit: %d", _srs_config->config().c_str(), _srs_config->get_max_connections()); 185 srs_trace("conf: %s, limit: %d", _srs_config->config().c_str(), _srs_config->get_max_connections());
181 186
182 // features 187 // features
183 - show_features(); 188 + show_macro_features();
184 189
185 /** 190 /**
186 * we do nothing in the constructor of server, 191 * we do nothing in the constructor of server,