Page 3 of 3

Re: Compile on Win 7-30-19

Posted: Thu Aug 15, 2019 7:39 am
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()

Re: Compile on Win 7-30-19

Posted: Tue Mar 17, 2020 8:19 pm
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.