X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;ds=sidebyside;f=CMakeLists.txt;h=f4195ae6346985e8fae082cef1d2b66d42a1beb3;hb=12af22e8cc217827cf4f118b0f5e4ebbda9925ae;hp=c492e408fd54cb03814bf17929b325a8ce76af2e;hpb=0b783fc554d60729e19485891b5a7743fd609635;p=oota-llvm.git diff --git a/CMakeLists.txt b/CMakeLists.txt index c492e408fd5..f4195ae6346 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -461,6 +461,7 @@ else(UNIX) set(CMAKE_INSTALL_RPATH "\$ORIGIN/../lib") if (${CMAKE_SYSTEM_NAME} MATCHES FreeBSD) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,origin") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,origin") endif() endif(NOT DEFINED CMAKE_INSTALL_RPATH) endif() @@ -469,6 +470,11 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) include_directories( ${LLVM_INCLUDE_DIR} ${LLVM_MAIN_INCLUDE_DIR}) +# when crosscompiling import the executable targets from a file +if(CMAKE_CROSSCOMPILING) + include(CrossCompile) +endif(CMAKE_CROSSCOMPILING) + if( ${CMAKE_SYSTEM_NAME} MATCHES FreeBSD ) # On FreeBSD, /usr/local/* is not used by default. In order to build LLVM # with libxml2, iconv.h, etc., we must add /usr/local paths.