"Inspector" build error when using CMake

I wanna building a "Inspector" by using CMake.

But, When I changed a flag(BUILD_Inspector) "OFF" to "On" according to guides, below errors are occurred.

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.22000.
The C compiler identification is MSVC 19.16.27045.0
The CXX compiler identification is MSVC 19.16.27045.0
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/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 (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe - skipped
Detecting CXX compile features
Detecting CXX compile features - done
Info. Detecting doxygen
Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) (Required is at least version "1.8.4")
Info: /D_WINDOWS has been removed from CMAKE_CXX_FLAGS
Info: /DWIN32 has been removed from CMAKE_CXX_FLAGS
Info: /D_WINDOWS has been removed from CMAKE_C_FLAGS
Info: /DWIN32 has been removed from CMAKE_C_FLAGS
Info: TCL is used by OCCT
CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:273 (message):
The package name passed to `find_package_handle_standard_args` (Tclsh) does
not match the name of the calling package (TCL). This can lead to problems
in calling code that expects `find_package` result variables (e.g.,
`_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.18/Modules/FindTclsh.cmake:95 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
C:/Program Files/CMake/share/cmake-3.18/Modules/FindTCL.cmake:49 (include)
adm/cmake/tcl.cmake:58 (find_package)
CMakeLists.txt:14 (include)
CMakeLists.txt:497 (OCCT_INCLUDE_CMAKE_FILE)
This warning is for project developers. Use -Wno-dev to suppress it.

Info: TK is used by OCCT
CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:273 (message):
The package name passed to `find_package_handle_standard_args` (Tclsh) does
not match the name of the calling package (TCL). This can lead to problems
in calling code that expects `find_package` result variables (e.g.,
`_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.18/Modules/FindTclsh.cmake:95 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
C:/Program Files/CMake/share/cmake-3.18/Modules/FindTCL.cmake:49 (include)
adm/cmake/tk.cmake:62 (find_package)
CMakeLists.txt:14 (include)
CMakeLists.txt:500 (OCCT_INCLUDE_CMAKE_FILE)
This warning is for project developers. Use -Wno-dev to suppress it.

Info: Freetype is used by OCCT
Info: TKIVtk and TKIVtkDraw toolkits excluded due to VTK usage is disabled
Processing Qt 3-rd party
CMake Error at adm/cmake/qt.cmake:10 (message):
... Qt root directory was not found
Call Stack (most recent call first):
CMakeLists.txt:14 (include)
CMakeLists.txt:715 (OCCT_INCLUDE_CMAKE_FILE)

Configuring incomplete, errors occurred!
See also "C:/Users/dudql/source/repos/새 폴더 (2)/CMakeFiles/CMakeOutput.log".
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

I think QT's directory is not defined.
How can i define a QT's directory?

are there any solution for this problem?

Attachments: 
Kirill Gavrilov's picture

Looking into "adm/cmake/qt.cmake" I would expect that 3RDPARTY_QT_DIR variable to appear in the list - try running configure one more time. There is also a button in cmake-gui to add variable manually.

youngbin son's picture

thank you for your reply.

I add variable(3RDPARTY_QT_DIR) manually like picture.

But, same error is occurred.

Below is "adm/cmake/qt.cmake". are there any problem?

----------------------------------------------------------------------------------------------------------------------------
#qt

# Qt is searched manually first (just determine root)
message (STATUS "Processing qt 3-rd party")

if (NOT DEFINED ${3RDPARTY_QT_DIR} AND ${3RDPARTY_QT_DIR} STREQUAL "")
FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" qt 3RDPARTY_QT_DIR_NAME)

if (NOT DEFINED ${3RDPARTY_QT_DIR_NAME} AND ${3RDPARTY_QT_DIR_NAME} STREQUAL "")
message (FATAL_ERROR "... qt root directory was not found")
endif()

# Combine directory name with absolute path and show in GUI
set (3RDPARTY_QT_DIR "${3RDPARTY_DIR}/${3RDPARTY_QT_DIR_NAME}" CACHE PATH "The directory containing qt" FORCE)
message (STATUS "Info: Qt is used from folder: ${3RDPARTY_QT_DIR}")
endif()

set (USED_3RDPARTY_QT_DIR "${3RDPARTY_QT_DIR}")

# Now set CMAKE_PREFIX_PATH to point to local Qt installation.
# Without this setting find_package() will not work
set(CMAKE_PREFIX_PATH ${3RDPARTY_QT_DIR})

# Now we can apply standard CMake finder for Qt5. We do this mostly
# to have qt5_wrap_cpp() function available and Qt5_FOUND variable filled
find_package(Qt5 QUIET COMPONENTS Widgets Quick Xml PATHS ${3RDPARTY_QT_DIR} NO_DEFAULT_PATH)
if (NOT ${Qt5_FOUND})
# Now we can apply standard CMake finder for Qt. We do this mostly
# to have qt4_wrap_cpp() function available
find_package(Qt4)
#message (STATUS "Qt4 cmake configuration")
else()
#message (STATUS "Qt5 cmake configuration")
endif()
----------------------------------------------------------------------------------------------------------------------------

Attachments: 
frank pian's picture

I have the same problem, I built on Ubuntu 20.04.