Skip to content

Commit

Permalink
build some external libraries static
Browse files Browse the repository at this point in the history
  • Loading branch information
alemuntoni committed Dec 19, 2023
1 parent 737b71b commit 91168ae
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/external/e57.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@ if (TARGET XercesC::XercesC)
message(STATUS "- libE57 - using downloaded source")

set(MESSAGE_QUIET ON)
set(E57_BUILD_SHARED OFF)
add_subdirectory(${LIBE57_DIR} EXCLUDE_FROM_ALL)
unset(MESSAGE_QUIET)

add_library(external-libE57 INTERFACE)
target_link_libraries(external-libE57 INTERFACE E57Format)
install(TARGETS E57Format DESTINATION ${MESHLAB_LIB_INSTALL_DIR})
#install(TARGETS E57Format DESTINATION ${MESHLAB_LIB_INSTALL_DIR})
endif()
endif()
else()
Expand Down
4 changes: 2 additions & 2 deletions src/external/lib3ds.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ elseif(MESHLAB_ALLOW_DOWNLOAD_SOURCE_LIB3DS)
if (EXISTS ${LIB3DS_CHECK})
message(STATUS "- lib3ds - using downloaded source")
add_library(
external-lib3ds SHARED
external-lib3ds STATIC
"${LIB3DS_DIR}/lib3ds/atmosphere.c"
"${LIB3DS_DIR}/lib3ds/atmosphere.h"
"${LIB3DS_DIR}/lib3ds/background.c"
Expand Down Expand Up @@ -76,6 +76,6 @@ 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})
#install(TARGETS external-lib3ds DESTINATION ${MESHLAB_LIB_INSTALL_DIR})
endif()
endif()
3 changes: 2 additions & 1 deletion src/external/muparser.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ elseif(MESHLAB_ALLOW_DOWNLOAD_SOURCE_MUPARSER)
if(NOT OpenMP_CXX_FOUND)
set(ENABLE_OPENMP OFF)
endif()
set(BUILD_SHARED_LIBS OFF)
add_subdirectory(${MUPARSER_DIR} EXCLUDE_FROM_ALL)
if (APPLE AND OpenMP_CXX_FOUND)
target_link_libraries(muparser PRIVATE OpenMP::OpenMP_CXX)
Expand All @@ -51,6 +52,6 @@ elseif(MESHLAB_ALLOW_DOWNLOAD_SOURCE_MUPARSER)

add_library(external-muparser INTERFACE)
target_link_libraries(external-muparser INTERFACE muparser)
install(TARGETS muparser DESTINATION ${MESHLAB_LIB_INSTALL_DIR})
#install(TARGETS muparser DESTINATION ${MESHLAB_LIB_INSTALL_DIR})
endif()
endif()
2 changes: 1 addition & 1 deletion src/external/u3d.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if(MESHLAB_ALLOW_DOWNLOAD_SOURCE_U3D)

set(U3D_BUILD_LIBIDTF_TEST OFF)
set(U3D_BUILD_IDTF_TO_U3D_BIN OFF)
set(U3D_BUILD_STATIC_IDTF_LIB OFF)
set(U3D_BUILD_STATIC_IDTF_LIB ON)
set(U3D_INSTALL_LIBS OFF)
set(MESSAGE_QUIET ON)
add_subdirectory(${U3D_DIR})
Expand Down

0 comments on commit 91168ae

Please sign in to comment.