From 2cb95c67a376f296def9790d90193c0d52b2e052 Mon Sep 17 00:00:00 2001 From: markdegreef Date: Wed, 13 Mar 2019 19:56:39 +0100 Subject: [PATCH] [assimp] fix linux build (#5632) --- ports/assimp/portfile.cmake | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ports/assimp/portfile.cmake b/ports/assimp/portfile.cmake index 1dc3b74051..4fe655f70d 100644 --- a/ports/assimp/portfile.cmake +++ b/ports/assimp/portfile.cmake @@ -55,8 +55,15 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(READ ${CURRENT_PACKAGES_DIR}/share/assimp/assimp-config.cmake ASSIMP_CONFIG) string(REPLACE "get_filename_component(ASSIMP_ROOT_DIR \"\${_PREFIX}\" PATH)" "set(ASSIMP_ROOT_DIR \${_PREFIX})" ASSIMP_CONFIG ${ASSIMP_CONFIG}) -string(REPLACE "set( ASSIMP_LIBRARIES \${ASSIMP_LIBRARIES})" - "set( ASSIMP_LIBRARIES optimized \${ASSIMP_LIBRARY_DIRS}/\${ASSIMP_LIBRARIES}.lib debug \${ASSIMP_LIBRARY_DIRS}/../debug/lib/\${ASSIMP_LIBRARIES}d.lib)" ASSIMP_CONFIG ${ASSIMP_CONFIG}) + +if(WIN32) + string(REPLACE "set( ASSIMP_LIBRARIES \${ASSIMP_LIBRARIES})" + "set( ASSIMP_LIBRARIES optimized \${ASSIMP_LIBRARY_DIRS}/\${ASSIMP_LIBRARIES}.lib debug \${ASSIMP_LIBRARY_DIRS}/../debug/lib/\${ASSIMP_LIBRARIES}d.lib)" ASSIMP_CONFIG ${ASSIMP_CONFIG}) +else() + string(REPLACE "set( ASSIMP_LIBRARIES \${ASSIMP_LIBRARIES})" + "set( ASSIMP_LIBRARIES optimized \${ASSIMP_LIBRARY_DIRS}/lib\${ASSIMP_LIBRARIES}.a \${ASSIMP_LIBRARY_DIRS}/libIrrXML.a \${ASSIMP_LIBRARY_DIRS}/libz.a debug \${ASSIMP_LIBRARY_DIRS}/../debug/lib/lib\${ASSIMP_LIBRARIES}d.a \${ASSIMP_LIBRARY_DIRS}/../debug/lib/libIrrXMLd.a \${ASSIMP_LIBRARY_DIRS}/../debug/lib/libz.a)" ASSIMP_CONFIG ${ASSIMP_CONFIG}) +endif() + file(WRITE ${CURRENT_PACKAGES_DIR}/share/assimp/assimp-config.cmake "${ASSIMP_CONFIG}") # Handle copyright