Skip to content

Commit 45d9e62

Browse files
committed
Fix a bug - unbeknownst to me, libpng bundled libm (math) for us
This was causing problems building a shared library without libpng because the math.h symbols weren't defined. This fixes this issue
1 parent 6fea658 commit 45d9e62

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ set_target_properties(
145145
saxbospiral PROPERTIES VERSION ${SAXBOSPIRAL_VERSION_STRING}
146146
SOVERSION ${PROJECT_VERSION_MAJOR}
147147
)
148+
# link libsaxbospiral with C math library
149+
target_link_libraries(saxbospiral m)
148150
# Link libsaxbospiral with libpng so we get libpng symbols (if support enabled)
149151
if(SAXBOSPIRAL_PNG_SUPPORT)
150152
target_link_libraries(saxbospiral ${PNG_LIBRARY})

0 commit comments

Comments
 (0)