Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow building on BSD/Solaris/etc with CMake #64

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ endif()
# Add GNUInstallDirs for GNU infrastructure before target)include_directories
#

if(CMAKE_SYSTEM_NAME MATCHES "^(Linux|kFreeBSD|GNU)$" AND NOT CMAKE_CROSSCOMPILING)
if(UNIX AND NOT CMAKE_CROSSCOMPILING)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note #65

include(GNUInstallDirs)
endif()

Expand Down Expand Up @@ -239,10 +239,10 @@ add_library(kissfft::kissfft ALIAS kissfft)
add_library(kissfft::kissfft-${KISSFFT_DATATYPE} ALIAS kissfft)

#
# Build with libm (-lm) on Linux and kFreeBSD
# Build with libm (-lm) on Unix
#

if(CMAKE_SYSTEM_NAME MATCHES "^(Linux|kFreeBSD|GNU)$" AND NOT CMAKE_CROSSCOMPILING)
if(UNIX AND NOT CMAKE_CROSSCOMPILING)
target_link_libraries(kissfft PRIVATE m)
endif()

Expand All @@ -255,10 +255,10 @@ function(add_kissfft_executable NAME)
target_link_libraries(${NAME} PRIVATE kissfft::kissfft)

#
# Build with libm (-lm) on Linux and kFreeBSD
# Build with libm (-lm) on Unix
#

if(CMAKE_SYSTEM_NAME MATCHES "^(Linux|kFreeBSD|GNU)$" AND NOT CMAKE_CROSSCOMPILING)
if(UNIX AND NOT CMAKE_CROSSCOMPILING)
target_link_libraries(${NAME} PRIVATE m)
endif()

Expand Down