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. (#69)

Reason: Error message under Windows: "EXEC : CMake error : failed to create symbolic link 'Imath.dll': operation not permitted"
Signed-off-by: Transporter <ogre.transporter@gmail.com>

Co-authored-by: Cary Phillips <cary@ilm.com>
  • Loading branch information
OgreTransporter and cary-ilm authored Jan 14, 2021
1 parent d550120 commit 8916ff5
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 8916ff5

Please sign in to comment.