Skip to content

Commit

Permalink
Set RC file
Browse files Browse the repository at this point in the history
  • Loading branch information
tbeu committed Nov 21, 2023
1 parent 0884b80 commit d477c30
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion cmake/src.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ set(MATIO_SOURCES
${PROJECT_BINARY_DIR}/src/matioConfig.h
)

if(MSVC)
set(MATIO_RESOURCE_FILE ${PROJECT_SOURCE_DIR}/visual_studio/matio.rc)
set_source_files_properties(${MATIO_RESOURCE_FILE} PROPERTIES LANGUAGE RC)
endif()

if(STDINT_MSVC)
set(MATIO_SOURCES ${MATIO_SOURCES} ${PROJECT_SOURCE_DIR}/visual_studio/stdint_msvc.h)
endif()
Expand All @@ -53,7 +58,11 @@ if(USE_GNU_LINK_FLAGS OR USE_LLVM_MACOS_LINK_FLAGS)
endif()

if(MATIO_SHARED)
add_library(${PROJECT_NAME} SHARED ${MATIO_SOURCES})
if(MSVC)
add_library(${PROJECT_NAME} SHARED ${MATIO_SOURCES} ${MATIO_RESOURCE_FILE})
else()
add_library(${PROJECT_NAME} SHARED ${MATIO_SOURCES})
endif()
else()
add_library(${PROJECT_NAME} STATIC ${MATIO_SOURCES})
endif()
Expand Down

0 comments on commit d477c30

Please sign in to comment.