[CMake] Cross-compilation related question

Xiangyun Kong xykong at yahoo.com
Tue Aug 25 03:08:10 EDT 2009


I am trying to do a cross-compilation with CMake. I got a problem 
in creating a 64-bit shared library on a Win32 platform.
The problem is the CMAKE is always appending the
/machine:I386 following my arch setup /machine:x64.

My CMake file looks like,

    CMAKE_FORCE_CXX_COMPILER(VC_CROSS_COMPILER vc_corss_compiler)
    add_library(foo SHARED file.cpp)
    set_target_properties(foo
       PROPERTIES
       LINK_FLAGS /machine:x64 
    )
    target_link_libraries(foo other_libraries)

Any hints on solving the problems are appreciated.

Thanks.

Xiangyun






More information about the CMake mailing list