(software-type)
CMAKE_INSTALL_PREFIX
をセットすれば良さそう。
PKG_CONFIG_PATH=/usr/local/opt/opencv3/lib/pkgconfig pkg-config --libs-only-L opencv
include(CMakeForceCompiler)
SET(CMAKE_SYSTEM_NAME Darwin)
SET(CMAKE_SIZEOF_VOID_P 8)
# specify the cross compiler
cmake_force_c_compiler(/opt/osxcross/target/bin/o64-clang Clang)
cmake_force_cxx_compiler(/opt/osxcross/target/bin/o64-clang++ Clang)
#SET(CMAKE_C_COMPILER /opt/osxcross/target/bin/x86_64-apple-darwin14-clang)
#SET(CMAKE_CXX_COMPILER /opt/osxcross/target/bin/x86_64-apple-darwin14-clang++)
SET(CMAKE_AR /opt/osxcross/target/bin/x86_64-apple-darwin14-ar CACHE FILEPATH "Archiver")
#set(CMAKE_RC_COMPILER /usr/bin/x86_64-w64-mingw32-windres)
SET(CMAKE_OSX_SYSROOT /opt/osxcross/target/SDK/MacOSX10.10.sdk)
# set PKG_CONFIG_PATH for osxcross Compile Environment
SET(ENV{PKG_CONFIG_PATH} /opt/osxcross/target/macports/pkgs/opt/local/lib/pkgconfig)
# where is the target environment
#set(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32/)
SET(CMAKE_FIND_ROOT_PATH /opt/osxcross/target/macports/pkgs/opt/local ${CMAKE_OSX_SYSROOT} ${CMAKE_OSX_SYSROOT}/usr/bin )
# adjust the default behaviour of the FIND_XXX() commands:
# search headers and libraries in the target environment, search
# programs in the host environment
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)