Skip to content

Commit

Permalink
Make creating symbolic links of shared objects optional during instal…
Browse files Browse the repository at this point in the history
…lation.

Reason: Error message under Windows: "EXEC : CMake error : failed to create symbolic link 'Imath.dll': operation not permitted"
Signed-off-by: Transporter <[email protected]>
  • Loading branch information
OgreTransporter committed Dec 4, 2020
1 parent fa7f543 commit 5b15028
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions config/ImathSetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ set(IMATH_PACKAGE_NAME "Imath ${IMATH_VERSION}" CACHE STRING "Public string / la
# Whether to generate and install a pkg-config file Imath.pc on
if(WIN32)
option(IMATH_INSTALL_PKG_CONFIG "Install Imath.pc file" OFF)
option(IMATH_INSTALL_SYM_LINK "Create symbolic links for shared objects" OFF)
else()
option(IMATH_INSTALL_PKG_CONFIG "Install Imath.pc file" ON)
option(IMATH_INSTALL_SYM_LINK "Create symbolic links for shared objects" ON)
endif()

########################
Expand Down
2 changes: 1 addition & 1 deletion config/LibraryDefine.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function(IMATH_DEFINE_LIBRARY libname)
PUBLIC_HEADER
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${IMATH_OUTPUT_SUBDIR}
)
if(BUILD_SHARED_LIBS AND (NOT "${IMATH_LIB_SUFFIX}" STREQUAL ""))
if(BUILD_SHARED_LIBS AND (NOT "${IMATH_LIB_SUFFIX}" STREQUAL "") AND IMATH_INSTALL_SYM_LINK)
set(verlibname ${CMAKE_SHARED_LIBRARY_PREFIX}${libname}${IMATH_LIB_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX})
set(baselibname ${CMAKE_SHARED_LIBRARY_PREFIX}${libname}${CMAKE_SHARED_LIBRARY_SUFFIX})
if(WIN32)
Expand Down

0 comments on commit 5b15028

Please sign in to comment.