diff --git a/.augmentignore b/.augmentignore index f94e94ffe..d71672316 100644 --- a/.augmentignore +++ b/.augmentignore @@ -41,4 +41,4 @@ **/usr/** **/.github/** **/gdb/** -**/ide/** +**/cmake/** diff --git a/.gitignore b/.gitignore index 33dfbd971..b8056ec48 100644 --- a/.gitignore +++ b/.gitignore @@ -35,12 +35,6 @@ *.exe cmake-build-debug -/trunk/ide/srs_clion/CMakeCache.txt -/trunk/ide/srs_clion/CMakeFiles -/trunk/ide/srs_clion/Makefile -/trunk/ide/srs_clion/cmake_install.cmake -/trunk/ide/srs_clion/srs -/trunk/ide/srs_clion/Testing/ -/trunk/ide/vscode-build /build/ +/trunk/cmake/build diff --git a/.vscode/README.md b/.vscode/README.md index ccf9b4d6a..829cddbd7 100644 --- a/.vscode/README.md +++ b/.vscode/README.md @@ -17,26 +17,26 @@ Run commmand to configure the project by pressing `Command+Shift+P`, then type ` then select `Clang` as the toolchain. Or run the command manually in terminal: ```bash -cmake -S $HOME/git/srs/trunk/ide/srs_clion -B $HOME/git/srs/trunk/ide/vscode-build +cmake -S $HOME/git/srs/trunk/cmake -B $HOME/git/srs/trunk/cmake/build ``` > Note: Sometimes it may fail to configure when building libsrtp. Just retry, and it will succeed. > Note: Make sure you have `xcode` installed, and run `xcode-select --install` to setup the toolchains. -> Note: The `settings.json` is used to configure the cmake. It will use `$HOME/git/srs/trunk/ide/srs_clion/CMakeLists.txt` -> and `$HOME/git/srs/trunk/ide/vscode-build` as the source file and build directory. +> Note: The `settings.json` is used to configure the cmake. It will use `$HOME/git/srs/trunk/cmake/CMakeLists.txt` +> and `$HOME/git/srs/trunk/cmake/build` as the source file and build directory. Click the `Run > Run Without Debugging` or `Run > Start Debugging` from menu to start or debug the server. It will invoke the `build` task defined in `tasks.json`, or you can run it manually: ```bash -cmake --build $HOME/git/srs/trunk/ide/vscode-build +cmake --build $HOME/git/srs/trunk/cmake/build ``` > Note: The `launch.json` is used for running and debugging. The build will output the binary to -> `$HOME/git/srs/trunk/ide/vscode-build/srs`. +> `$HOME/git/srs/trunk/cmake/build/srs`. ## macOS: SRS UTest @@ -51,7 +51,7 @@ Run commmand to configure the project by pressing `Command+Shift+P`, then type ` then select `Clang` as the toolchain. Or run the command manually in terminal: ```bash -cmake -S $HOME/git/srs/trunk/ide/srs_clion -B $HOME/git/srs/trunk/ide/vscode-build +cmake -S $HOME/git/srs/trunk/cmake -B $HOME/git/srs/trunk/cmake/build ``` > Note: Sometimes it may fail to configure when building libsrtp. Just retry, and it will succeed. @@ -60,7 +60,7 @@ Afterwards, build the utest by pressing `Command+Shift+P`, then type `CMake: Bui build command. It will invoke the `build` task defined in `tasks.json`, or you can run it manually: ```bash -cmake --build $HOME/git/srs/trunk/ide/vscode-build +cmake --build $HOME/git/srs/trunk/cmake/build ``` Then you will discover all the unit testcases from the `View > Testing` panel. You can diff --git a/.vscode/launch.json b/.vscode/launch.json index f66d3e5f9..d462e2057 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -5,7 +5,7 @@ "name": "Launch SRS", "type": "cppdbg", "request": "launch", - "program": "${workspaceFolder}/trunk/ide/vscode-build/srs", + "program": "${workspaceFolder}/trunk/cmake/build/srs", "args": ["-c", "conf/console.conf"], "stopAtEntry": false, "cwd": "${workspaceFolder}/trunk", diff --git a/.vscode/settings.json b/.vscode/settings.json index 260ceba21..0ebeffd84 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,11 +1,11 @@ { - "cmake.sourceDirectory": "${workspaceFolder}/trunk/ide/srs_clion", - "cmake.buildDirectory": "${workspaceFolder}/trunk/ide/vscode-build", + "cmake.sourceDirectory": "${workspaceFolder}/trunk/cmake", + "cmake.buildDirectory": "${workspaceFolder}/trunk/cmake/build", "cmake.configureOnOpen": false, "cmake.ctest.testExplorerIntegrationEnabled": false, "testMate.cpp.test.advancedExecutables": [ "{build,Build,BUILD,out,Out,OUT}/**/*{test,Test,TEST}*", - "${workspaceFolder}/trunk/ide/vscode-build/**/*{utest,test,Test,TEST}*" + "${workspaceFolder}/trunk/cmake/build/**/*{utest,test,Test,TEST}*" ], "files.associations": { "vector": "cpp", diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 98388f3b3..3e439de19 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -4,7 +4,7 @@ { "label": "build", "type": "shell", - "command": "cmake --build ${workspaceFolder}/trunk/ide/vscode-build", + "command": "cmake --build ${workspaceFolder}/trunk/cmake/build", "group": { "kind": "build", "isDefault": true diff --git a/trunk/ide/srs_clion/CMakeLists.txt b/trunk/cmake/CMakeLists.txt similarity index 98% rename from trunk/ide/srs_clion/CMakeLists.txt rename to trunk/cmake/CMakeLists.txt index 68d4614fc..51937b9c9 100755 --- a/trunk/ide/srs_clion/CMakeLists.txt +++ b/trunk/cmake/CMakeLists.txt @@ -11,7 +11,7 @@ set (CMAKE_CXX_STANDARD 11) ########################################################### execute_process( - COMMAND bash -c "cd ${PROJECT_SOURCE_DIR}/../../ && pwd" + COMMAND bash -c "cd ${PROJECT_SOURCE_DIR}/../ && pwd" OUTPUT_VARIABLE SRS_DIR ) string(STRIP ${SRS_DIR} SRS_DIR)