ifm / ifm3d

Library and Utilities for working with ifm pmd-based 3D ToF Cameras
https://api.ifm3d.com
Apache License 2.0
106 stars 69 forks source link

Error Building under Windows 10 #381

Closed Petopp closed 1 year ago

Petopp commented 1 year ago

Hello, by the step cmake -G %IFM3D_CMAKE_GENERATOR% -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON -DBUILD_SDK_PKG=ON -DGTEST_CMAKE_DIR=%IFM3D_BUILD_DIR%\googletest\googletest -Dgtest_force_shared_crt=TRUE -DCMAKE_PREFIX_PATH=%IFM3D_BUILD_DIR%\install;%IFM3D_OPENCV_PATH% -DBOOST_ROOT=%IFM3D_BOOST_ROOT% -DBoost_USE_STATIC_LIBS=ON -DCMAKE_BUILD_TYPE=%CONFIG% -DCMAKE_INSTALL_PREFIX=%IFM3D_BUILD_DIR%\install ..

I get the following message, in the Windows 10 cmd: CMake Warning: No source or binary directory provided. Both will be assumed to be the same as the current working directory, but note that this warning will become a fatal error in future CMake releases. CMake Error: The source directory "C:/Prog/ifm3d/ifm3d/build" does not appear to contain CMakeLists.txt. Specify --help for usage, or press the help button on the CMake GUI.

All other steps did not cause any errors and worked without problems.

For testing I copied the CMakeLists.txt from the %IFM3D_BUILD_DIR%\ifm3d into the build folder. This then produced the following error messages:

C:\Prog\ifm3d\ifm3d\build>cmake -G %IFM3D_CMAKE_GENERATOR% -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON -DBUILD_SDK_PKG=ON -DGTEST_CMAKE_DIR=%IFM3D_BUILD_DIR%\googletest\googletest -Dgtest_force_shared_crt=TRUE -DCMAKE_PREFIX_PATH=%IFM3D_BUILD_DIR%\install;%IFM3D_OPENCV_PATH% -DBOOST_ROOT=%IFM3D_BOOST_ROOT% -DBoost_USE_STATIC_LIBS=ON -DCMAKE_BUILD_TYPE=%CONFIG% -DCMAKE_INSTALL_PREFIX=%IFM3D_BUILD_DIR%\install .. CMake Warning: No source or binary directory provided. Both will be assumed to be the same as the current working directory, but note that this warning will become a fatal error in future CMake releases. CMake Error at CMakeLists.txt:5 (include): include could not find requested file: cmake/StandardProjectSettings.cmake CMake Error at CMakeLists.txt:13 (include): include could not find requested file: GetVersionFromGitTag CMake Warning at CMakeLists.txt:25 (project): VERSION keyword not followed by a value or was followed by a value that expanded to nothing. -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19044. -- The C compiler identification is MSVC 19.33.31630.0 -- The CXX compiler identification is MSVC 19.33.31630.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.33.31629/bin/Hostx64/x64/cl.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.33.31629/bin/Hostx64/x64/cl.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done CMake Error at CMakeLists.txt:30 (include): include could not find requested file: cmake/StandardProjectSettings.cmake CMake Error at CMakeLists.txt:33 (include): include could not find requested file: MacroOutOfSourceBuild CMake Error at CMakeLists.txt:34 (macro_ensure_out_of_source_build): Unknown CMake command "macro_ensure_out_of_source_build". -- Configuring incomplete, errors occurred! See also "C:/Prog/ifm3d/ifm3d/build/CMakeFiles/CMakeOutput.log".

Does anyone here have an idea what I am doing wrong or what I should be aware of?

Thank you

Petopp commented 1 year ago

OK, the solution was easier than I thought. Just use the admin rights and that's it :-)