raccy / obs-rtmp-nicolive

ニコニコ生放送用 OBS Studio プラグイン
MIT License
57 stars 8 forks source link

単独ビルドが出来ません #4

Closed ghost closed 8 years ago

ghost commented 8 years ago

ubuntu 14.04LTS xfce 32bit版及びubuntu 14.04LTS mate 32bit版で確認済みなのですがlibcurl3-devがlibcurl4-openssl-devへと変化しているらしく a@a-desktop:~/obs-rtmp-nicolive-2.0/build$cmake -DCMAKE_BUILD_TYPE=Release .. -- The C compiler identification is GNU 4.8.4 -- The CXX compiler identification is GNU 4.8.4 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- RTMP NicoLive build only it CMake Error at CMakeLists.txt:48 (find_package): By not providing "FindLibcurl.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Libcurl", but CMake did not find one.

Could not find a package configuration file provided by "Libcurl" with any of the following names:

LibcurlConfig.cmake
libcurl-config.cmake

Add the installation prefix of "Libcurl" to CMAKE_PREFIX_PATH or set "Libcurl_DIR" to a directory containing one of the above files. If "Libcurl" provides a separate development package or SDK, be sure it has been installed.

-- Configuring incomplete, errors occurred! とエラーが出てビルドできませんでした

raccy commented 8 years ago
$ sudo apt-get install libcurl4-openssl-dev

をしても、どうやらCMakeのファイルがパッケージに含まれないようです。上のコマンドでlibcurl4-openssl-devを入れておいて、ソース内で

$ cd tools/cmake/
$ wget https://github.com/jp9000/obs-studio/raw/master/cmake/Modules/FindLibcurl.cmake

として、obs-studioのFindLibcurl.cmakeをtools/cmake配下に用意しておいてください。その上でCMakeLists.txtfind_package(Libcurl REQUIRED)のすぐ上に

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
            "${CMAKE_CURRENT_SOURCE_DIR}/tools/cmake")

を追加すればcmakeもmakeもうまくいくかと思います。

ghost commented 8 years ago

ありがとうございます! raccyさんの解説の通り追加を行いcmakeを行ったところ全てうまくビルドできました