Hey
Thanks this helped!
But for some reason I'm missing libImath/imath library.
I ended up adding it too, but for some reason I'm linking against wrong
version, Hes linking against x86_64 instead of arm for arm :/
Any idea how to properly link that one? Its odd that openimageIO does
not link it properly tho.
Right now I'm doing
find_package(Imath REQUIRED)
include_directories(${imath_ROOT}include)
and
target_link_libraries(${app}, ${libs},
${imath_root}lib/libImath-3_1.29.4.0.dylib)
but sadly that still don't work:/
Regards
Dariusz
On 13/06/2022 17:22, Larry Gritz wrote:
The one canonical variable to set, according to modern CMake style,
is: OpenImageIO_ROOT
The plethora of other names, FOO_DIR, FOO_ROOT_DIR, etc.,
FOO_LOCATION, etc., are all relics of early CMake days when there
wasn't an established convention and everybody did it differently.
And the place to set it is the root directory in which you can find
the bin, include, lib. Like this:
set(OpenImageIO_ROOT ${BREW_ROOT}/openimageio/2.3.16.0)
CMake itself understand that it will look for config files
specifically in {root}/lib/cmake/{projectname}
On Jun 13, 2022, at 4:15 AM, Dariusz <[email protected]> wrote:
Hey
I'm working on a Cmake script that would allow me to build 2 binaries
for my app using 2 different architectures.
For this I've decided to have 2 Brew's on my system. I've gone with
brew as vcpkg does not support openimageio for arm, or intel. Cant
remember.
1. Intel
2. Arm
Now this approach worked with openSSL, my flags can build both intel
and arm bundle, but when it comes to openimageio I cant include it no
matter what I try :/
In general I have something like
```
if(FLAG_BUILD_INTEL)
set(BREW_ROOT "/usr/local/Cellar/")
set(CMAKE_OSX_ARCHITECTURE "x86_64" CACHE INTERNAL "" FORCE)
else()
set(BREW_ROOT "/opt/homebrew/Cellar/"
set(CMAKE_OSX_ARCHITECTURE "arm64" CACHE INTERNAL "" FORCE)
endif()
```
then I try to do
```
set(OpenImageIO_ROOT_DIR
${BREW_ROOT}openimageio/2.3.16.0/lib/cmake/OpenImageIO)
and then
find_package(OpenImageIO CONFIG REQUIRED)
and 50x other things. No matter what I do, he either finds openimage
but set it to "FALSE" or he finds it but when I compile I end up with:
Undefined symbols for architecture arm64. Or x86_64.
No matter what I do when I do
message(${OpenImageIO_DIR})
it is always the same directory. I can not tell my cmake, to use
openimage from either Brew Intel or Brew ARM.
Its weird that even as is, my app wont compile for arm either, (it
should) but for now I've no idea how to bite it.
Has any1 done any cross compiles? How did u solve arm/intel targetting?
Regards
Dariusz
--
DARIUSZ MAKOWSKi
CGI-Photographer
07 590 530 854
[email protected]
www.dariuszmakowski.com
------------------------------------------------------------------------
Avast logo <https://www.avast.com/antivirus>
This email has been checked for viruses by Avast antivirus software.
www.avast.com <https://www.avast.com/antivirus>
<x-msg://399/#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
--
Larry Gritz
[email protected]
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
--
DARIUSZ MAKOWSKi
CGI-Photographer
07 590 530 854
[email protected]
www.dariuszmakowski.com
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org