Compile on Win 7-30-19

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
apeltauer
Posts: 399
Joined: Fri Aug 11, 2017 2:19 pm

Re: Compile on Win 7-30-19

Post by apeltauer »

uwestoehr wrote: Wed Aug 14, 2019 10:17 pm Wow! With MSVC 2017 the CMake configurations works out of the box (CMake 3.14.1). Only the option BUILD_QT5 to create a Qt5 build is missing. Can this be activated by default for the next libpack version?
Qt 5 build should be set to ON if cmake finds the file "${FREECAD_LIBPACK_DIR}/lib/Qt5Core.lib". But for this the cmake variable "FREECAD_LIBPACK_DIR" needs to be set correct.
see line 201

Code: Select all

    if (DEFINED ENV{FREECAD_LIBPACK_DIR})
        set(FREECAD_LIBPACK_DIR $ENV{FREECAD_LIBPACK_DIR} CACHE PATH  "Directory of the FreeCAD LibPack")
        message(STATUS "Found libpack env variable: ${FREECAD_LIBPACK_DIR}")
        if (EXISTS ${FREECAD_LIBPACK_DIR}/lib/Qt5Core.lib)
            option(BUILD_QT5 "Build with Qt5." ON)
        else()
            option(BUILD_QT5 "Build with Qt5." OFF)
        endif()
    else()
        set(FREECAD_LIBPACK_DIR ${CMAKE_SOURCE_DIR} CACHE PATH  "Directory of the FreeCAD LibPack")
        if (EXISTS ${FREECAD_LIBPACK_DIR}/lib/Qt5Core.lib)
            option(BUILD_QT5 "Build with Qt5." ON)
        else()
            option(BUILD_QT5 "Build with Qt5." OFF)
        endif()
    endif()
nosairat
Posts: 1
Joined: Tue Mar 17, 2020 8:15 pm

Re: Compile on Win 7-30-19

Post by nosairat »

hi
I had the same problem
but after I have changed the version of visual studio from 2015 to 2017 it worked for me.
Post Reply