Skip to content

Commit

Permalink
Add math library
Browse files Browse the repository at this point in the history
  • Loading branch information
jesperpedersen committed Jan 7, 2022
1 parent f6fb10a commit ab0c0b8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
13 changes: 8 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ message(STATUS "pgprtdbg ${VERSION_STRING}")

include(CheckCCompilerFlag)
include(CheckCSourceCompiles)
include(CheckLibraryExists)
include(FindPackageHandleStandardArgs)
include(GNUInstallDirs)

Expand All @@ -58,11 +59,13 @@ endif()

set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
# if (THREADS_HAVE_PTHREAD_ARG)
# message(STATUS "pthreads found")
# else ()
# message(FATAL_ERROR "pthreads needed")
# endif()

CHECK_LIBRARY_EXISTS(m round "" HAVE_LIB_M)
if (HAVE_LIB_M)
set(EXTRA_LIBS ${EXTRA_LIBS} m)
else ()
message(FATAL_ERROR "math needed")
endif (HAVE_LIB_M)

file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/src/")

Expand Down
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ include_directories(
link_libraries(
${LIBEV_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
${EXTRA_LIBS}
)

#
Expand Down

0 comments on commit ab0c0b8

Please sign in to comment.