我試圖做一個使用SFML和Box2D的小遊戲。我有以下目錄結構:CMake無法與第三方庫一起工作
/
src/
game/ # my code
thirdparty/ # other libraries' code
box2d/
sfml/
bin/
etc...
我試圖設定,讓我可以運行make並Box2D的或者他們需要SFML編譯爲好,因爲我可能會做一些改變的庫。
我試圖把這個在我CMkaeLists.txt:
find_package(Box2D)
find_package(sfml-window)
find_package(sfml-graphics)
find_package(sfml-system)
以及其他的東西,但我不斷收到錯誤,我不知道如何讓他們周圍。例如:
CMake Error at CMakeLists.txt:20 (find_package):
Could not find module Findsfml-window.cmake or a configuration file for
package sfml-window.
Adjust CMAKE_MODULE_PATH to find Findsfml-window.cmake or set
sfml-window_DIR to the directory containing a CMake configuration file for
sfml-window. The file will have one of the following names:
sfml-windowConfig.cmake
sfml-window-config.cmake
但我找不到任何它列出了存在的文件。
你可能會發佈一個簡單的例子來說明如何做這些事情嗎?謝謝! – sidewinderguy 2011-06-17 01:00:10