Skip to content

Commit

Permalink
fixes for MSVC 14.1, aka VS 2017 (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
ra1nb0w authored and szechyjs committed May 29, 2019
1 parent ac749b0 commit 9a04ed5
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
project(mbe)
cmake_minimum_required(VERSION 2.6)

if(MSVC)
# needed for M_PI macro
add_definitions(-D_USE_MATH_DEFINES)
endif()

FILE(GLOB SRCS *.c)

include_directories("${PROJECT_SOURCE_DIR}")

ADD_LIBRARY(mbe-static STATIC ${SRCS})
ADD_LIBRARY(mbe-shared SHARED ${SRCS})
TARGET_LINK_LIBRARIES(mbe-static m)
TARGET_LINK_LIBRARIES(mbe-shared m)
if(NOT WIN32)
TARGET_LINK_LIBRARIES(mbe-static m)
TARGET_LINK_LIBRARIES(mbe-shared m)
endif()

include(GNUInstallDirs)

Expand Down

0 comments on commit 9a04ed5

Please sign in to comment.