diff --git a/eng/native/functions.cmake b/eng/native/functions.cmake index 1509a17fa59b0..1bdcf1ddd3845 100644 --- a/eng/native/functions.cmake +++ b/eng/native/functions.cmake @@ -439,11 +439,11 @@ function(_add_executable) endfunction() function(_add_library) - if(NOT WIN32) + if(NOT WIN32 AND "${ARGV1}" STREQUAL "SHARED") add_library(${ARGV} ${VERSION_FILE_PATH}) else() add_library(${ARGV}) - endif(NOT WIN32) + endif(NOT WIN32 AND "${ARGV1}" STREQUAL "SHARED") list(FIND CLR_CROSS_COMPONENTS_LIST ${ARGV0} INDEX) if (DEFINED CLR_CROSS_COMPONENTS_LIST AND ${INDEX} EQUAL -1) set_target_properties(${ARGV0} PROPERTIES EXCLUDE_FROM_ALL 1) diff --git a/src/coreclr/src/pal/src/eventprovider/lttngprovider/CMakeLists.txt b/src/coreclr/src/pal/src/eventprovider/lttngprovider/CMakeLists.txt index d55dab3557f35..b6b54e24ac734 100644 --- a/src/coreclr/src/pal/src/eventprovider/lttngprovider/CMakeLists.txt +++ b/src/coreclr/src/pal/src/eventprovider/lttngprovider/CMakeLists.txt @@ -55,6 +55,7 @@ add_library(eventprovider add_library(coreclrtraceptprovider SHARED ${TRACEPOINT_PROVIDER_SOURCES} + ${VERSION_FILE_PATH} ) add_dependencies(eventprovider generated_eventing_headers)