Skip to content

Commit

Permalink
Link libshogun with winmm when compilng with MSVC
Browse files Browse the repository at this point in the history
required for timeGetTime
  • Loading branch information
vigsterkr committed Aug 15, 2016
1 parent b836e84 commit cb4c433
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/shogun/CMakeLists.txt
Expand Up @@ -97,6 +97,9 @@ FOREACH(template ${LIBSHOGUN_SRC_TMP})
ENDFOREACH()

# add target for dynamic
if(MSVC)
SET(POSTLINKFLAGS ${POSTLINKFLAGS} winmm)
endif()
add_library(shogun SHARED $<TARGET_OBJECTS:libshogun> lib/config.h)
set_target_properties(shogun PROPERTIES
VERSION ${LIBSHOGUNVER}
Expand All @@ -113,6 +116,9 @@ endif()
if (BUILD_STATIC)
add_library(shogun-static STATIC $<TARGET_OBJECTS:libshogun> lib/config.h)
set_target_properties(shogun-static PROPERTIES OUTPUT_NAME shogun)
if(MSVC)
target_link_libraries(shogun winmm.lib)
endif()
ENDIF()

IF (CTAGS_FOUND)
Expand Down

0 comments on commit cb4c433

Please sign in to comment.