Skip to content

Commit

Permalink
cmake: add tinyxml2 install hack for Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
julianoes committed Feb 7, 2018
1 parent 179d4e0 commit 9bdfd32
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion core/CMakeLists.txt
Expand Up @@ -11,7 +11,23 @@ else()
set(library_type "SHARED")
endif()

if(IOS OR MSVC OR APPLE)
if(IOS OR APPLE)
# We need tinyxml2 for the camera definition parsing.
add_subdirectory(third_party/tinyxml2 EXCLUDE_FROM_ALL)
include_directories(SYSTEM third_party/tinyxml2)
# We install the tinyxml2 library manually.
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
# Need to remove that d again.
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/third_party/tinyxml2/libtinyxml2d.5.0.1.dylib
DESTINATION ${lib_path}
RENAME libtinyxml2.dylib
)
else()
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/third_party/tinyxml2/libtinyxml2.5.0.1.dylib
DESTINATION ${lib_path}
)
endif()
elseif(MSVC)
# We need tinyxml2 for the camera definition parsing.
add_subdirectory(third_party/tinyxml2 EXCLUDE_FROM_ALL)
include_directories(SYSTEM third_party/tinyxml2)
Expand Down

0 comments on commit 9bdfd32

Please sign in to comment.