benikabocha / saba

OpenGL Viewer (OBJ PMD PMX)
MIT License
442 stars 60 forks source link

What to do without CMakeLists.txt in GLFW #41

Open eightmusic opened 1 year ago

eightmusic commented 1 year ago

Could NOT find GLFW (missing: GLFW_LIBRARIES) CMake Error at external/CMakeLists.txt:8 (add_subdirectory): The source directory

D:/test/saba-master/saba-master/external/glfw

does not contain a CMakeLists.txt file.

benikabocha commented 1 year ago

Try the following command.

git submodule init
git submodule update

or

# glfw build and install
git clone https://github.com/glfw/glfw.git
cd glfw
cmake -D CMAKE_INSTALL_PREFIX <glfw install dir> -S ./ -B ./build
cmake --build ./build --config Release --target ALL_BUILD
cmake --build ./build --config Release --target INSTALL

# saba build
cmake -D SABA_BULLET_ROOT=<bullet dir> -D SABA_GLFW_ROOT=<glfw dir> -S ./ -B ./build