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
dari...@dariuszmakowski.com
www.dariuszmakowski.com


--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
_______________________________________________
Oiio-dev mailing list
Oiio-dev@lists.openimageio.org
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to