Configure Error:Unknown CMake command "fc_wrap_cpp".

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
tak
Posts: 31
Joined: Thu May 02, 2019 2:32 am

Re: Configure Error:Unknown CMake command "fc_wrap_cpp".

Post by tak »

tak wrote: Fri May 10, 2019 8:42 am
apeltauer wrote: Fri May 10, 2019 8:00 am Good to hear that the compilation worked.
Now you have to copy all files and folder from the libpack to your cmake build directory. (The folder structure needs to be the same then in the libpack)
The following folders are not mandatory to run FreeCAD:
  • cmake
  • inc
  • include
  • lib
Then FreeCAD.exe should run...
I big step forward now.
I copy all libpack file to the cmake build directory.
I can build and run the exe.
it can open the loading page.
https://imgur.com/uewYteR

but after a few second. the loading page is disappear and no software popup. The image is the last screen of the loading page.
I found that there is a folder call "Tux" under "Mod". if I delete it, FC is working fine. Is "Tux" a important mod? Can I work without it?
User avatar
waebbl
Posts: 200
Joined: Thu Aug 16, 2018 3:12 pm

Re: Configure Error:Unknown CMake command "fc_wrap_cpp".

Post by waebbl »

Although this bug is quite old, I'd like to push it up, as this happened to me today, when I was testing for needed changes on the live package for Gentoo Linux. The snippet from the build log:

Code: Select all

-- Performing Test _flag_found
-- Performing Test _flag_found - Success
-- Performing Test _flag_found
-- Performing Test _flag_found - Success
-- /var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999_build/src/Mod/Import/App/StepShapePy.cpp
-- /var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999_build/src/Mod/Fem/App/FemMeshPy.cpp
-- /var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999_build/src/Mod/Fem/App/FemPostPipelinePy.cpp
-- /var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999_build/src/Mod/Fem/Gui/ViewProviderFemMeshPy.cpp
CMake Error at src/Mod/Sandbox/Gui/CMakeLists.txt:40 (fc_wrap_cpp):
  Unknown CMake command "fc_wrap_cpp".
For this build I had a debug USE flag set, which enables -DBUILD_SANDBOX=ON and -DBUILD_TEMPLATE=ON

Grepping the source tree leads to a few files which use the fc_wrap_cpp function (beside several UseLibPack*.cmake include files, which are irrelevant for Linux):

Code: Select all

waebbl@artus /var/tmp/portage/media-gfx/freecad-9999/work/freecad-9999 $ find . -name CMakeLists.txt -exec grep -H fc_wrap_cpp {} \;
./src/Mod/Sandbox/Gui/CMakeLists.txt:fc_wrap_cpp(SandboxGui_MOC_SRCS ${SandboxGui_MOC_HDRS})
./src/Mod/Cam/Gui/CMakeLists.txt:fc_wrap_cpp(CamGui_MOC_SRCS ${CamGui_MOC_HDRS})
./src/Mod/Assembly/Gui/CMakeLists.txt:fc_wrap_cpp(AssemblyGui_MOC_SRCS ${AssemblyGui_MOC_HDRS})
Omitting the debug USE flag, and thus setting -DBUILD_SANDBOX=OFF and -DBUILD_TEMPLATE=OFF finished the configuration. A build log can be found at https://dpaste.com/DX4MDY6GJ#wrap
Post Reply