Open Entropy512 opened 1 year ago
I've made a bit of progress, first - need to include idlc/Generate.cmake too:
if(CMAKE_CROSSCOMPILING)
include("${Cyclone_HOST_PREFIX}/lib/cmake/CycloneDDS-CXX/idlcxx/Generate.cmake")
include("${Cyclone_HOST_PREFIX}/lib/cmake/CycloneDDS/idlc/Generate.cmake")
endif()
In addition, after a bit of digging into cmake_fu, I figured out WHY my current protobuf cross-compile stuff is working in another project (One of the variables I set overrides find_program), and adapted it to the variables used by Generate.cmake:
set(Cyclone_HOST_PREFIX $ENV{HOME}/cyclonedds_host)
set(_idlcxx_shared_lib ${Cyclone_HOST_PREFIX}/lib/libcycloneddsidlcxx.so.0.11.0)
set(_idlc_executable ${Cyclone_HOST_PREFIX}/bin/idlc)
Now the problem is that the generator expects the -o option to work properly, but it does not - I am guessing this is due to https://github.com/eclipse-cyclonedds/cyclonedds-cxx/pull/148 not yet being adapted to https://github.com/eclipse-cyclonedds/cyclonedds/pull/1263
Hi @Entropy512 I got a similar issue as "Could not find _idlc_executable using the following names: idlc" when I set -DBUILD_EXAMPLES=ON. Could you please help to trouble shooting it? I did not find cyclonedds_host in my machine
This is somewhat of a continuation of the conversation in https://github.com/eclipse-cyclonedds/cyclonedds/issues/794#issuecomment-1205572397
I'm trying to start from @stan-guer 's comment, adapting it to use cyclonedds-cxx:
(yes, I'm starting with trying to cross-compile hello world as a standalone dependent app with some restructuring of the file tree - since the example is dependent on being built within the cyclonedds source tree)
I've set Cyclone_HOST_PREFIX in my toolchain file to where I installed the host-architecture build of cyclonedds and cyclonedds-cxx (In my case, ~/cyclonedds_host)
The question is - how do I add Cyclone_HOST_PREFIX to the search path so that find_library() works for cycloneddsidlcxx? I get the following:
Adding Cyclone_HOST_PREFIX to CMAKE_FIND_ROOT_PATH does not work.