Skip to content

Commit

Permalink
lib3ds static only on apple
Browse files Browse the repository at this point in the history
  • Loading branch information
alemuntoni committed Dec 19, 2023
1 parent 3f2be12 commit dfb6300
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/external/lib3ds.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,12 @@ elseif(MESHLAB_ALLOW_DOWNLOAD_SOURCE_LIB3DS)

if (EXISTS ${LIB3DS_CHECK})
message(STATUS "- lib3ds - using downloaded source")
set(MODE SHARED)
if (APPLE)
set(MODE STATIC)
endif()
add_library(
external-lib3ds STATIC
external-lib3ds ${MODE}
"${LIB3DS_DIR}/lib3ds/atmosphere.c"
"${LIB3DS_DIR}/lib3ds/atmosphere.h"
"${LIB3DS_DIR}/lib3ds/background.c"
Expand Down Expand Up @@ -76,6 +80,8 @@ elseif(MESHLAB_ALLOW_DOWNLOAD_SOURCE_LIB3DS)

target_include_directories(external-lib3ds SYSTEM PUBLIC "${LIB3DS_DIR}")
target_link_libraries(external-lib3ds PRIVATE external-disable-warnings)
#install(TARGETS external-lib3ds DESTINATION ${MESHLAB_LIB_INSTALL_DIR})
if (NOT APPLE)
install(TARGETS external-lib3ds DESTINATION ${MESHLAB_LIB_INSTALL_DIR})
endif()
endif()
endif()

0 comments on commit dfb6300

Please sign in to comment.