commit d4a3f56d761728aa176fc1661b36bc0bbdb91264
parent 8f3648209f3944484179bd1cefe2395efb958da3
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Mon, 3 Oct 2016 16:58:22 +0200
Fix the SSF build as a shared library
Diffstat:
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
@@ -69,12 +69,16 @@ rcmake_prepend_path(SSF_FILES_INC ${SSF_SOURCE_DIR})
rcmake_prepend_path(SSF_FILES_INC_API ${SSF_SOURCE_DIR})
rcmake_prepend_path(SSF_FILES_DOC ${PROJECT_SOURCE_DIR}/../)
+if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUCC)
+ set(MATH_LIB m)
+endif()
+
if(BUILD_STATIC)
add_library(ssf STATIC ${SSF_FILES_INC} ${SSF_FILES_SRC})
set_target_properties(ssf PROPERTIES DEFINE_SYMBOL SSF_STATIC)
else()
add_library(ssf SHARED ${SSF_FILES_INC} ${SSF_FILES_SRC})
- target_link_libraries(ssf RSys StarSP)
+ target_link_libraries(ssf RSys StarSP ${MATH_LIB})
set_target_properties(ssf PROPERTIES
DEFINE_SYMBOL SSF_SHARED_BUILD
VERSION ${VERSION}
@@ -88,10 +92,6 @@ rcmake_setup_devel(ssf StarSF ${VERSION} star/ssf_version.h)
################################################################################
if(NOT NO_TEST)
- if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUCC)
- set(MATH_LIB m)
- endif()
-
function(new_test _name)
add_executable(${_name} ${SSF_SOURCE_DIR}/${_name}.c)
target_link_libraries(${_name} ssf RSys StarSP ${MATH_LIB})
diff --git a/src/ssf.h b/src/ssf.h
@@ -153,10 +153,10 @@ SSF_API const struct ssf_bxdf_type ssf_lambertian_reflection;
/* Glossy reflections with respect to a microfacet distribution */
SSF_API const struct ssf_bxdf_type ssf_microfacet_reflection;
/* Glossy reflections with respect to a microfacet distribution. In contrast to
- * the common microfacet reflection, this BRDF ensures, by construction, the
- * energy conservation property without requiring the normalization of the
- * BRDF. As a conterpart, it only provides the sample function. The others
- * functions return invalid value. */
+ * the common microfacet reflection, this BRDF ensures, by design, the energy
+ * conservation property without requiring the normalization of the BRDF. As a
+ * conterpart, it only provides the sample function. The others functions
+ * return invalid value. */
SSF_API const struct ssf_bxdf_type ssf_microfacet2_reflection;
/* Fresnel term for perfect reflection */
@@ -291,7 +291,7 @@ ssf_lambertian_reflection_setup
(struct ssf_bxdf* bxdf,
const double reflectivity);
-res_T
+SSF_API res_T
ssf_microfacet_reflection_setup
(struct ssf_bxdf* data,
struct ssf_fresnel* fresnel,