Skip to content

Commit

Permalink
Do not include -lm on MSVC builds
Browse files Browse the repository at this point in the history
It's not needed there, see
gammu/python-gammu#15 (comment)

Signed-off-by: Michal Čihař <michal@cihar.com>
  • Loading branch information
nijel committed Feb 21, 2017
1 parent 667e4e4 commit c845917
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,9 @@ if(MSVC)
# Generate PDB data even for release build
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi")
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF")
set(MATH_LIBS "")
else(MSVC)
set(MATH_LIBS "-lm")
endif(MSVC)

if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_MINGW OR
Expand Down
2 changes: 1 addition & 1 deletion cmake/templates/gammu-smsd.pc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ Name: gammu-smsd
Description: Gammu SMSD library
Requires: gammu
Version: @GAMMU_VERSION@
Libs: -L${libdir} -lgsmsd -lm @SMSD_PRIVATE_LIBS@
Libs: -L${libdir} -lgsmsd @MATH_LIBS@ @SMSD_PRIVATE_LIBS@
Cflags: -I${includedir}

0 comments on commit c845917

Please sign in to comment.