Skip to content

Commit

Permalink
Propagate toolchain-file to external-project (#374)
Browse files Browse the repository at this point in the history
If defined, propagate the CMAKE_TOOLCHAIN_FILE argument to the cmake
argument of freetype, zlib and ogre projects.

Change-Id: Ibf2802b96c2238a06191e78a1b2a3128769a83af
Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
  • Loading branch information
lmayencourt authored and wjwwood committed Jan 29, 2019
1 parent 069eb10 commit a8eea33
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions rviz_ogre_vendor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ macro(build_freetype)
list(APPEND extra_cmake_args "-DCMAKE_C_FLAGS=/w")
endif()

if(DEFINED CMAKE_TOOLCHAIN_FILE)
list(APPEND extra_cmake_args "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}")
endif()

include(ExternalProject)
ExternalProject_Add(freetype-2.8.1
URL https://git.savannah.gnu.org/cgit/freetype/freetype2.git/snapshot/freetype2-VER-2-6-5.tar.gz
Expand Down Expand Up @@ -57,6 +61,10 @@ macro(build_zlib)
list(APPEND extra_cmake_args "-DCMAKE_C_FLAGS=/w")
endif()

if(DEFINED CMAKE_TOOLCHAIN_FILE)
list(APPEND extra_cmake_args "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}")
endif()

include(ExternalProject)
ExternalProject_Add(zlib-1.2.11
URL https://www.zlib.net/fossils/zlib-1.2.11.tar.gz
Expand Down Expand Up @@ -120,6 +128,10 @@ macro(build_ogre)
set(patch_exe patch)
endif()

if(DEFINED CMAKE_TOOLCHAIN_FILE)
list(APPEND extra_cmake_args "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}")
endif()

include(ExternalProject)
ExternalProject_Add(ogre-master-ca665a6
URL https://github.com/OGRECave/ogre/archive/v1.10.11.zip
Expand Down

0 comments on commit a8eea33

Please sign in to comment.