Reputation: 1708
I am having issues building the GLM library. I am using Windows and VS Code. I have the following installed:
For GLM, as instructed in their readme:
I downloaded the latest release and extracted it to c:\glm
I navigated to the folder in the command prompt and ran the command
C:\cmake\bin\cmake -DGLM_BUILD_TESTS=OFF -DBUILD_SHARED_LIBS=OFF -B build .
I got the following error:
CMake Error in CMakeLists.txt:
Running
'nmake' '-?'
failed with:
no such file or directory
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
I tried with cmake-gui as well but I got the same error when I clicked configure.
I also have the cmake extension for VS Code so I tried configuring and building in VS Code, right clicking on the CmakeLists.txt and selecting "Clean Reconfigure All Projects". That resolved the compiler related errors:
[cmake] -- Check for working C compiler: C:/mingw64/bin/gcc.exe - skipped
[cmake] -- Check for working CXX compiler: C:/mingw64/bin/g++.exe - skipped
And I also didn't get the no such file or directory
error. However, when I tried to continue with the rest of the instructions, at the C:\cmake\bin\cmake --build build -- install
command, I got the mingw32-make: *** No rule to make target 'install'. Stop.
error.
I see that there are two cmakes (cmake.exe and mingw32-make) and I was thinking that may be causing issues but I haven't found how I can fix that issue.
Upvotes: 0
Views: 114
Reputation: 1708
I want to provide what I did to solve this per the comments of @Tsyvarev and @drescherjm
I downloaded the actual source from the GLM releases page
After unzipping the source, at the root of the source, I ran the commands:
C:\cmake\bin\cmake -DGLM_BUILD_TESTS=OFF -DBUILD_SHARED_LIBS=OFF -B build . -G "MinGW Makefiles"
C:\cmake\bin\cmake --build build -- all
C:\cmake\bin\cmake --build build -- install
Adding "MinGW Makefiles" resolved the "compiler variable not set" errors I was getting and since the source contained the GLM_BUILD_INSTALL
, the install executed without errors.
Upvotes: 0