|
From: Chris C. <chr...@gm...> - 2020-01-08 00:50:06
|
Well damn, this is proving to be a sticky one. Would anyone who has built
on Windows using one of these methods mind telling me the value of their
"ZLIB_INCLUDE_DIR" variable in CMake? I have tried pointing it at the
3rdParty/include folder, where zlib.h exists, and at the base directory of
a new zlib source download where all the zlib headers exist, and so far all
I get is:
CMake Error at F:/Program
Files/CMake/share/cmake-3.12/Modules/FindPackageHandleStandardArgs.cmake:137
(message):
Could NOT find ZLIB (missing: ZLIB_INCLUDE_DIR) (Required is at least
version "1.2.4")
I'm having a hard time debugging this problem at all since the only error
messages point back to my CMake install in Program Files, not to any of the
CMakeLists files in the FG directories.
On Tue, Jan 7, 2020 at 1:53 PM Geoff McLane <ub...@ge...> wrote:
> Hi Chris, good to see you are persisting with the Wiki... it works...
> alternatively, fg-from-scratch, thanks Scott, also works for me, at least
> some time back now... but is a different kettle of fish ;=))
>
> You should NOT need to download a zlib source... it should be in 3rdParty,
> from the wiki zip... I built x64, so used 3rdParty.x64... but will try to
> get around to trying the 32-bit... maybe there IS a 32-bit prob...
>
> Also, I set a number of environment variable, to assist in the cmake find
> of components, like SIMGEAR_DIR=x:\install\msvc140_64\SimGear;
> ZLIBDIR=X:\3rdPary.x64; QT5_DIR=D:\Qt5.6.1\5.6\msvc2015_64;
> OSG_DIR=X:\install\msvc140-64\OpensceneGraph (from wiki zip, which also
> seem to include msvc140, ie 32-bit); BOOST_ROOT=X:\boost (using 1.67)...
>
> AND add most of them also as cmake options... like
> -DCMAKE_PREFIX_PATH:PATH=%ZLIBDIR%;%OSG_DIR%;%SIMGEAR_DIR%...
>
> What is AAX?
>
> Hi James, agree 100% setting CMAKE_MSVCIDE_RUN_PATH should do it,
> according the cmake docs... but it does not... at least not for me, and it
> seems others...
>
> Maybe it something to do with the PARENT_SCOPE used... and using
> message(STATUS "*** <context>
> CMAKE_MSVCIDE_RUN_PATH=${CMAKE_MSVCIDE_RUN_PATH}"), in various places, I
> draw lots of /BLANKS/... ??? Hmmm...
>
> Maybe since `setup_fgfs_embededed_resources()` is only called from Main,
> and test_suite... maybe it should also be called from fgrcc creation, where
> the add_custom_target(...) now resides... will try that...
>
> Wow, that worked... the diff is -
> ```
> diff --git a/src/EmbeddedResources/CMakeLists.txt
> b/src/EmbeddedResources/CMakeLists.txt
> index d72d9629b..ce4c17e69 100644
> --- a/src/EmbeddedResources/CMakeLists.txt
> +++ b/src/EmbeddedResources/CMakeLists.txt
> @@ -1,5 +1,10 @@
> +
> +include(SetupFGFSEmbeddedResources)
> +
> add_executable(fgrcc fgrcc.cxx fgrcc.hxx)
> target_link_libraries(fgrcc SimGearCore ${PLATFORM_LIBS})
> +# Set up the embedded resources.
> +setup_fgfs_embedded_resources()
>
> add_custom_target(
> embeddedresources
>
> ```
>
> Have now removed the PATH setting in my build-me.bat... thanks...
>
> And Chris, hang in there... it is worth it in the end... I hope ;=))
>
> email me direct, if you have specific questions...
>
> HTH, Geoff
>
>
> On 07/01/2020 20:58, Chris Calef wrote:
>
> And, hm. Seems like I'm getting closer (still following the
> Build)using_CMAKE wiki), but am currently held up on ZLIB_INCLUDE_DIR, and
> I also have no idea what AAX is or where it is supposed to be. I found
> zlib.lib and CMAKE seems to accept that, but when it comes to the include
> dir, I found a zlib.h in 3rdParty/include, but it would not accept that,
> and then I downloaded zlib source (v. 1.2.11, the current one) and there is
> no include directory there but the top folder has headers, so I tried that,
> but also to no avail.
>
> I have to switch gears now but will hit it again later.
>
>
> On Tue, Jan 7, 2020 at 11:13 AM Chris Calef <chr...@gm...> wrote:
>
>> Hmm, okay, thanks Scott, I'll take a look at fg-from-scratch next...
>> tried the CMake wiki, it's showing signs of perhaps working at some point
>> but my next big question is: What version of Boost is tested to work with
>> this? I started with 1.72, being the latest, and backtracked to 1.68, but
>> I'm still not seeing a directory structure that leads me to believe I'm in
>> the right place.
>>
>> On Tue, Jan 7, 2020 at 1:48 AM James Turner <ja...@fl...> wrote:
>>
>>>
>>>
>>> On 6 Jan 2020, at 20:26, Geoff McLane <ub...@ge...> wrote:
>>>
>>> Hi Brendan, having not done that wiki build in a while... decided to
>>> give it a try... using VS2015... W10.x64
>>>
>>> In my x:\build-fg\build-me.bat, found I had to add `set
>>> PATH=X:\3rdParty.x64\bin;%PATH%` to get over the fact fgfcc needs zlib.dll,
>>> got no other errors... have yet to test the installed fgfs.exe... but looks
>>> good...
>>>
>>> And that PATH change is also good when running just about any of the
>>> SG/FG EXEs, not just fgfcc...
>>>
>>> This also saves patching the fgfcc CMakeLists.txt, but that is certainly
>>> another way to go…
>>>
>>> All these PATH changes are *supposed* to not be needed, because that’s
>>> what MSVC_IDE_RUNPATH is for.
>>>
>>> So I guess we can conclude, it’s not working as expected, for some
>>> people. Which is frustrating, since it’s exactly the intended mechanism for
>>> this scenario.
>>>
>>> Kind regards,
>>> James
>>>
>>
>
> _______________________________________________
> Flightgear-devel mailing list
> Fli...@li...
> https://lists.sourceforge.net/lists/listinfo/flightgear-devel
>
|