Skip to content

Commit

Permalink
Add 'lib' prefix to Windows static libraries.
Browse files Browse the repository at this point in the history
The prefix helps distinguish between static libraries
and import libraries on Windows.
  • Loading branch information
rvinluan-sidefx committed Nov 28, 2023
1 parent 52afec0 commit 8867933
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmake/LibraryDefine.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,13 @@ function(OPENEXR_DEFINE_LIBRARY libname)
VERSION ${OPENEXR_LIB_VERSION}
)
endif()

set(OPENEXR_LIB_PREFIX)
if(WIN32 AND NOT BUILD_SHARED_LIBS)
set(OPENEXR_LIB_PREFIX "lib")
endif()
set_target_properties(${libname} PROPERTIES
OUTPUT_NAME "${libname}${OPENEXR_LIB_SUFFIX}"
OUTPUT_NAME "${OPENEXR_LIB_PREFIX}${libname}${OPENEXR_LIB_SUFFIX}"
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
)
add_library(${PROJECT_NAME}::${libname} ALIAS ${libname})
Expand Down

0 comments on commit 8867933

Please sign in to comment.