OrcaSlicer/cmake/modules/Findlibnoise.cmake
Nick Johnson fd0b2547f2
Add support for structured noise (perlin) fuzzy skin (#7678)
* Add support for perlin noise fuzzy skin

* Support multiple types of coherent noise

* Updated tooltips for more clarity.

* Reorder options as suggested by @discip

* Fix accidental removal of &

* Move libnoise to deps

---------

Co-authored-by: SoftFever <softfeverever@gmail.com>
2025-01-27 22:45:16 +08:00

15 lines
No EOL
494 B
CMake

find_path(LIBNOISE_INCLUDE_DIR libnoise/noise.h)
find_library(LIBNOISE_LIBRARY NAMES libnoise libnoise_static)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(libnoise DEFAULT_MSG
LIBNOISE_LIBRARY
LIBNOISE_INCLUDE_DIR
)
if(libnoise_FOUND)
add_library(noise::noise STATIC IMPORTED)
set_target_properties(noise::noise PROPERTIES
IMPORTED_LOCATION "${LIBNOISE_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${LIBNOISE_INCLUDE_DIR}"
)
endif()