util/cmap: link against libm only if it was found
This commit is contained in:
parent
afacd1b8fe
commit
d38b699432
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# CMakeLists.txt to build utilities for the FLTK project using CMake (www.cmake.org)
|
# CMakeLists.txt to build utilities for the FLTK project using CMake (www.cmake.org)
|
||||||
#
|
#
|
||||||
# Copyright 1998-2025 by Bill Spitzak and others.
|
# Copyright 1998-2026 by Bill Spitzak and others.
|
||||||
#
|
#
|
||||||
# This library is free software. Distribution and use rights are outlined in
|
# This library is free software. Distribution and use rights are outlined in
|
||||||
# the file "COPYING" which should have been included with this file. If this
|
# the file "COPYING" which should have been included with this file. If this
|
||||||
@ -31,8 +31,12 @@
|
|||||||
|
|
||||||
add_executable(cmap cmap.cxx)
|
add_executable(cmap cmap.cxx)
|
||||||
|
|
||||||
# cmap doesn't need to link against FLTK libraries - it's a standalone tool
|
# cmap doesn't need to link against FLTK libraries - it's a standalone tool,
|
||||||
|
# but it requires libm on Unix/Linux - link against libm, but only if found.
|
||||||
|
|
||||||
|
if(LIB_m)
|
||||||
target_link_libraries(cmap PRIVATE m)
|
target_link_libraries(cmap PRIVATE m)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Set properties
|
# Set properties
|
||||||
set_target_properties(cmap PROPERTIES
|
set_target_properties(cmap PROPERTIES
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user