diff options
| author | Patrick Storz <eduard.braun2@gmx.de> | 2019-09-02 21:27:27 +0000 |
|---|---|---|
| committer | Patrick Storz <eduard.braun2@gmx.de> | 2019-09-02 21:27:27 +0000 |
| commit | 826ee998a4fd7e19b89427d16265d88ba7820957 (patch) | |
| tree | 7215b13c74ff029943a6adfb4ae2371aebd53479 | |
| parent | Extension updates for 1.0 (!808) (diff) | |
| download | inkscape-826ee998a4fd7e19b89427d16265d88ba7820957.tar.gz inkscape-826ee998a4fd7e19b89427d16265d88ba7820957.zip | |
2geom: Use sincos function if available
| -rw-r--r-- | CMakeScripts/ConfigChecks.cmake | 8 | ||||
| -rw-r--r-- | src/2geom/CMakeLists.txt | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/CMakeScripts/ConfigChecks.cmake b/CMakeScripts/ConfigChecks.cmake index aa151c7c8..2a023e8a9 100644 --- a/CMakeScripts/ConfigChecks.cmake +++ b/CMakeScripts/ConfigChecks.cmake @@ -1,16 +1,11 @@ include(${CMAKE_CURRENT_LIST_DIR}/ConfigPaths.cmake) -#--------------- -# From here on: # Set all HAVE_XXX variables, to correctly set all defines in config.h -#SET(CMAKE_REQUIRED_INCLUDES ${INK_INCLUDES}) include(CheckIncludeFiles) include(CheckIncludeFileCXX) include(CheckFunctionExists) include(CheckStructHasMember) -# usage: CHECK_INCLUDE_FILES (<header> <RESULT_VARIABLE> ) -# usage: CHECK_FUNCTION_EXISTS (<function name> <RESULT_VARIABLE> ) -# usage: CHECK_STRUCT_HAS_MEMBER (<struct> <member> <header> <RESULT_VARIABLE>) +include(CheckCXXSymbolExists) set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${INKSCAPE_LIBS}) set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${INKSCAPE_INCS_SYS}) @@ -24,6 +19,7 @@ CHECK_STRUCT_HAS_MEMBER(fsmblks mallinfo malloc.h HAVE_STRUCT_MALLINFO_FSMBLKS) CHECK_STRUCT_HAS_MEMBER(hblkhd mallinfo malloc.h HAVE_STRUCT_MALLINFO_HBLKHD) CHECK_STRUCT_HAS_MEMBER(uordblks mallinfo malloc.h HAVE_STRUCT_MALLINFO_UORDBLKS) CHECK_STRUCT_HAS_MEMBER(usmblks mallinfo malloc.h HAVE_STRUCT_MALLINFO_USMBLKS) +CHECK_CXX_SYMBOL_EXISTS(sincos math.h HAVE_SINCOS) # 2geom define # Create the configuration files config.h in the binary root dir configure_file(${CMAKE_SOURCE_DIR}/config.h.cmake ${CMAKE_BINARY_DIR}/include/config.h) diff --git a/src/2geom/CMakeLists.txt b/src/2geom/CMakeLists.txt index 3c18c4ffd..e1e708e6d 100644 --- a/src/2geom/CMakeLists.txt +++ b/src/2geom/CMakeLists.txt @@ -3,6 +3,10 @@ if (CMAKE_BUILD_TYPE MATCHES Strict) set(CMAKE_CXX_FLAGS_STRICT "${CMAKE_CXX_FLAGS_STRICT} -Wno-error=deprecated-declarations") endif() +if(HAVE_SINCOS) + add_definitions(-DHAVE_SINCOS) +endif() + set(2geom_SRC affine.cpp basic-intersection.cpp |
