[prev in list] [next in list] [prev in thread] [next in thread] 

List:       flightgear-devel
Subject:    Re: [Flightgear-devel] VR/OpenXR support status update
From:       James Turner <james () flightgear ! org>
Date:       2022-02-13 15:25:07
Message-ID: 5428A245-A536-4A9D-B735-324FA7CF8A51 () flightgear ! org
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On 13 Feb 2022, at 00:04, Wayne Bragg <killaccount@cox.net> wrote:
> 
> My cmake skills are non existent.
> 
> So in Windows I am assuming the loader is…
> 
> D:\FlightGearBuild\OpenXR-SDK\build\win64\src\loader\Release\openxr_loader.lib
> 
> How and where exactly do I point to this?
> 
> Do I set it like this?
> 
> set(OpenXR_DIR "D:/FlightGearBuild/OpenXR-SDK/build/win64/src/loader/Release/openxr_loader.lib")
>  
> Where?
> 
> Something like D:\FlightGearBuild\flightgear\CMakeLists.txt

All of this is totally a bad idea and will make your life very difficult :)

You don't /ever/ need to edit a Cmake file unless myself (or James H..) screwed up. \
What you need to do is **configure** Cmake by passing it appropriate arguments when \
you run it ‘the first time' (i.e with no existing CMakeCache.txt in the SG/FG build \
directory)

(Just as you would never manually edit an autoconf.ac, you'd pass some arguments to \
‘configure')

As James (the other one…) mentioned, 99% chance, you need to set CMAKE_PREFIX_PATH, \
or extend it, to include the prefix where you installed XR. (Or, you could drop the \
compiled files into you regular OSG prefix, since CMake must already be finding those \
via another CMAKE_PREFIX_PATH entry)

Looking at your example above, I see a reference to OpenXR-SDK/build : I'd suggest \
maybe doing an install step, to get a tree with the more standard layout of:

	{prefix}
		lib/foo.lib
		bin/foo.dll
		include/foo/foo.h
		(etc)

And then of course you add {prefix} to your CMAKE_PREFIX_PATH.

(build trees rarely have this layout, but install trees usually do)

All of the above is 100% generic for any Windows library you want to tell CMake path. \
And you'll note the path we build up for windows-3rd-party is indeed exactly the \
same; also the same for the OSG install tree.

Kind regards,
James


[Attachment #5 (unknown)]

<html><head><meta http-equiv="Content-Type" content="text/html; \
charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; \
line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote \
type="cite" class=""><div class="">On 13 Feb 2022, at 00:04, Wayne Bragg &lt;<a \
href="mailto:killaccount@cox.net" class="">killaccount@cox.net</a>&gt; \
wrote:</div><br class="Apple-interchange-newline"><div class=""><meta charset="UTF-8" \
class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif; \
caret-color: rgb(0, 0, 0); font-style: normal; font-variant-caps: normal; \
font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; \
text-transform: none; white-space: normal; word-spacing: 0px; \
-webkit-text-stroke-width: 0px; text-decoration: none;" class="">My cmake skills are \
non existent.</div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, \
sans-serif; caret-color: rgb(0, 0, 0); font-style: normal; font-variant-caps: normal; \
font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; \
text-transform: none; white-space: normal; word-spacing: 0px; \
-webkit-text-stroke-width: 0px; text-decoration: none;" class=""><o:p \
class="">&nbsp;</o:p></div><div style="margin: 0in; font-size: 11pt; font-family: \
Calibri, sans-serif; caret-color: rgb(0, 0, 0); font-style: normal; \
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: \
start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: \
0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">So in Windows I \
am assuming the loader is…</div><div style="margin: 0in; font-size: 11pt; \
font-family: Calibri, sans-serif; caret-color: rgb(0, 0, 0); font-style: normal; \
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: \
start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: \
0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><o:p \
class="">&nbsp;</o:p></div><div style="margin: 0in; font-size: 11pt; font-family: \
Calibri, sans-serif; caret-color: rgb(0, 0, 0); font-style: normal; \
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: \
start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: \
0px; -webkit-text-stroke-width: 0px; text-decoration: none;" \
class="">D:\FlightGearBuild\OpenXR-SDK\build\win64\src\loader\Release\openxr_loader.lib</div><div \
style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif; caret-color: \
rgb(0, 0, 0); font-style: normal; font-variant-caps: normal; font-weight: normal; \
letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; \
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; \
text-decoration: none;" class=""><o:p class="">&nbsp;</o:p></div><div style="margin: \
0in; font-size: 11pt; font-family: Calibri, sans-serif; caret-color: rgb(0, 0, 0); \
font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: \
normal; text-align: start; text-indent: 0px; text-transform: none; white-space: \
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" \
class="">How and where exactly do I point to this?</div><div style="margin: 0in; \
font-size: 11pt; font-family: Calibri, sans-serif; caret-color: rgb(0, 0, 0); \
font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: \
normal; text-align: start; text-indent: 0px; text-transform: none; white-space: \
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" \
class=""><o:p class="">&nbsp;</o:p></div><div style="margin: 0in; font-size: 11pt; \
font-family: Calibri, sans-serif; caret-color: rgb(0, 0, 0); font-style: normal; \
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: \
start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: \
0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">Do I set it \
like this?</div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, \
sans-serif; caret-color: rgb(0, 0, 0); font-style: normal; font-variant-caps: normal; \
font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; \
text-transform: none; white-space: normal; word-spacing: 0px; \
-webkit-text-stroke-width: 0px; text-decoration: none;" class=""><o:p \
class="">&nbsp;</o:p></div><div style="margin: 0in; font-size: 11pt; font-family: \
Calibri, sans-serif; caret-color: rgb(0, 0, 0); font-style: normal; \
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: \
start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: \
0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">set(OpenXR_DIR \
"D:/FlightGearBuild/OpenXR-SDK/build/win64/src/loader/Release/openxr_loader.lib")</div><div \
style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif; caret-color: \
rgb(0, 0, 0); font-style: normal; font-variant-caps: normal; font-weight: normal; \
letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; \
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; \
text-decoration: none;" class=""><o:p class="">&nbsp;</o:p></div><div style="margin: \
0in; font-size: 11pt; font-family: Calibri, sans-serif; caret-color: rgb(0, 0, 0); \
font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: \
normal; text-align: start; text-indent: 0px; text-transform: none; white-space: \
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" \
class="">Where?</div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, \
sans-serif; caret-color: rgb(0, 0, 0); font-style: normal; font-variant-caps: normal; \
font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; \
text-transform: none; white-space: normal; word-spacing: 0px; \
-webkit-text-stroke-width: 0px; text-decoration: none;" class=""><o:p \
class="">&nbsp;</o:p></div><div style="margin: 0in; font-size: 11pt; font-family: \
Calibri, sans-serif; caret-color: rgb(0, 0, 0); font-style: normal; \
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: \
start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: \
0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">Something like \
D:\FlightGearBuild\flightgear\CMakeLists.txt</div></div></blockquote></div><br \
class=""><div class="">All of this is totally a bad idea and will make your life very \
difficult :)</div><div class=""><br class=""></div><div class="">You don't /ever/ \
need to edit a Cmake file unless myself (or James H..) screwed up. What you need to \
do is **configure** Cmake by passing it appropriate arguments when you run it ‘the \
first time' (i.e with no existing CMakeCache.txt in the SG/FG build \
directory)</div><div class=""><br class=""></div><div class="">(Just as you would \
never manually edit an autoconf.ac, you'd pass some arguments to \
‘configure')</div><div class=""><br class=""></div><div class="">As James (the \
other one…) mentioned, 99% chance, you need to set CMAKE_PREFIX_PATH, or extend it, \
to include the prefix where you installed XR. (Or, you could drop the compiled files \
into you regular OSG prefix, since CMake must already be finding those via another \
CMAKE_PREFIX_PATH entry)</div><div class=""><br class=""></div><div class="">Looking \
at your example above, I see a reference to OpenXR-SDK/build : I'd suggest maybe \
doing an install step, to get a tree with the more standard layout of:</div><div \
class=""><br class=""></div><div class=""><span class="Apple-tab-span" \
style="white-space:pre">	</span>{prefix}</div><div class=""><span \
class="Apple-tab-span" style="white-space:pre">		</span>lib/foo.lib</div><div \
class=""><span class="Apple-tab-span" \
style="white-space:pre">		</span>bin/foo.dll</div><div class=""><span \
class="Apple-tab-span" style="white-space:pre">		</span>include/foo/foo.h</div><div \
class=""><span class="Apple-tab-span" \
style="white-space:pre">		</span>(etc)</div><div class=""><br class=""></div><div \
class="">And then of course you add {prefix} to your CMAKE_PREFIX_PATH.</div><div \
class=""><br class=""></div><div class="">(build trees rarely have this layout, but \
install trees usually do)</div><div class=""><br class=""></div><div class="">All of \
the above is 100% generic for any Windows library you want to tell CMake path. And \
you'll note the path we build up for windows-3rd-party is indeed exactly the same; \
also the same for the OSG install tree.</div><div class=""><br class=""></div><div \
class="">Kind regards,</div><div class="">James</div></body></html>





_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic