CMake を使用して別のライブラリをコンパイルしようとしていますが、それには Boost が必要です。
私はCMakeとBoostの両方をインストールしました醸造するOS X 10.10 YosemiteではCMakeが見つけられません。Boostは/usr/local/Cellar/boost/1.55.0_2
私は次のことを試しました:
- 上記のパスを設定し
-DBoost_DIR
て-DBOOST_ROOT
- 上記のパスを設定し
-DBoost_INCLUDE_DIR
て+-DBOOST_INCLUDEDIR
/include
- CMakeLists.txtファイルでこれらのオプションをすべて設定する
- Boostを自分でコンパイルし、上記の変数を自分のビルドにポイントする
- 同じ問題に対して類似の解決策を試すここ、ここ、 そしてここ私が見つけたOS Xでのbrewについて言及している唯一の回答はこれです、同じ解決策は私には効果がありませんでした。
なぜ CMake は私の指示を露骨に無視するのでしょうか? :(
ベストアンサー1
の別の自作パッケージを見つけましたboost-python3
。これをインストールすると、CMake は Boost を見つけます。
brew install boost-python3
私に与える
> mkdir build ; ( cd build ; cmake .. )
-- The C compiler identification is AppleClang 6.0.0.6000056
-- The CXX compiler identification is AppleClang 6.0.0.6000056
-- 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
-- Found PythonInterp: /usr/local/bin/python (found version "2.7.9")
-- Found PythonLibs: /usr/lib/libpython2.7.dylib (found version "2.7.5")
-- Boost version: 1.56.0
-- Found the following Boost libraries:
-- python
-- Configuring done
-- Generating done
(リンクに問題がありますが、それはまた別の話です)