commit 71a53154d1383a05991b0c6b565a22526fcd4ecb
parent 82a7b2e8552adde24bbb90d82845a20383fb32ab
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Mon, 12 Dec 2022 10:00:53 +0100
Make the atmosphere, combustion and planeto libraries static
We are making this change to avoid exporting symbols only to test
internal features such as the combustion laser. The tests are now
linked to the static library that contains all the necessary symbols.
Diffstat:
4 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/cmake/atmosphere/CMakeLists.txt b/cmake/atmosphere/CMakeLists.txt
@@ -82,7 +82,7 @@ rcmake_prepend_path(HTRDR_ATMOSPHERE_FILES_INC ${HTRDR_SOURCE_DIR}/atmosphere)
rcmake_prepend_path(HTRDR_ATMOSPHERE_FILES_INC2 ${HTRDR_BUILD_DIR}/atmosphere)
# Atmosphere library
-add_library(htrdr-atmosphere SHARED
+add_library(htrdr-atmosphere STATIC
${HTRDR_ATMOSPHERE_FILES_SRC}
${HTRDR_ATMOSPHERE_FILES_INC}
${HTRDR_ATMOSPHERE_FILES_INC2})
@@ -94,7 +94,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
endif()
set_target_properties(htrdr-atmosphere PROPERTIES
- DEFINE_SYMBOL HTRDR_SHARED_BUILD
+ DEFINE_SYMBOL HTRDR_STATIC
VERSION ${VERSION}
SOVERSION ${VERSION_MAJOR})
diff --git a/cmake/combustion/CMakeLists.txt b/cmake/combustion/CMakeLists.txt
@@ -82,14 +82,14 @@ rcmake_prepend_path(HTRDR_COMBUSTION_FILES_SRC ${HTRDR_SOURCE_DIR}/combustion)
rcmake_prepend_path(HTRDR_COMBUSTION_FILES_INC ${HTRDR_SOURCE_DIR}/combustion)
# Combustion library
-add_library(htrdr-combustion SHARED
+add_library(htrdr-combustion STATIC
${HTRDR_COMBUSTION_FILES_SRC}
${HTRDR_COMBUSTION_FILES_INC})
target_link_libraries(htrdr-combustion
htrdr-core AtrSTM RSys Star3D StarCamera StarSF StarSP)
set_target_properties(htrdr-combustion PROPERTIES
- DEFINE_SYMBOL HTRDR_SHARED_BUILD
+ DEFINE_SYMBOL HTRDR_STATIC
VERSION ${VERSION}
SOVERSION ${VERSION_MAJOR})
diff --git a/cmake/planeto/CMakeLists.txt b/cmake/planeto/CMakeLists.txt
@@ -79,14 +79,14 @@ rcmake_prepend_path(HTRDR_PLANETO_FILES_SRC ${HTRDR_SOURCE_DIR}/planeto)
rcmake_prepend_path(HTRDR_PLANETO_FILES_INC ${HTRDR_SOURCE_DIR}/planeto)
# Planeto library
-add_library(htrdr-planeto SHARED
+add_library(htrdr-planeto STATIC
${HTRDR_PLANETO_FILES_SRC}
${HTRDR_PLANETO_FILES_INC})
target_link_libraries(htrdr-planeto
htrdr-core RNATM RNGRD RSys Star3D StarBuffer StarCamera StarSF StarSP)
set_target_properties(htrdr-planeto PROPERTIES
- DEFINE_SYMBOL HTRDR_SHARED_BUILD
+ DEFINE_SYMBOL HTRDR_STATIC
VERSION ${VERSION}
SOVERSION ${VERSION_MAJOR})
diff --git a/src/combustion/htrdr_combustion_laser.h b/src/combustion/htrdr_combustion_laser.h
@@ -54,21 +54,21 @@ struct htrdr_combustion_laser;
BEGIN_DECLS
-HTRDR_API res_T
+extern LOCAL_SYM res_T
htrdr_combustion_laser_create
(struct htrdr* htrdr,
const struct htrdr_combustion_laser_create_args* args,
struct htrdr_combustion_laser** laser);
-HTRDR_API void
+extern LOCAL_SYM void
htrdr_combustion_laser_ref_get
(struct htrdr_combustion_laser* laser);
-HTRDR_API void
+extern LOCAL_SYM void
htrdr_combustion_laser_ref_put
(struct htrdr_combustion_laser* laser);
-HTRDR_API void
+extern LOCAL_SYM void
htrdr_combustion_laser_trace_ray
(struct htrdr_combustion_laser* laser,
const double pos[3],
@@ -76,32 +76,32 @@ htrdr_combustion_laser_trace_ray
const double range[2],
double distance[2]);
-HTRDR_API void
+extern LOCAL_SYM void
htrdr_combustion_laser_get_mesh
(const struct htrdr_combustion_laser* laser,
/* Max distance of the laser mesh along its infinite dimension */
const double extent,
struct htrdr_combustion_laser_mesh* mesh);
-HTRDR_API void
+extern LOCAL_SYM void
htrdr_combustion_laser_get_position
(const struct htrdr_combustion_laser* laser,
double pos[3]);
-HTRDR_API void
+extern LOCAL_SYM void
htrdr_combustion_laser_get_direction
(const struct htrdr_combustion_laser* laser,
double dir[3]); /* Normalized */
-HTRDR_API double /* In W.m^2 */
+extern LOCAL_SYM double /* In W.m^2 */
htrdr_combustion_laser_get_flux_density
(const struct htrdr_combustion_laser* laser);
-HTRDR_API double /* In nm */
+extern LOCAL_SYM double /* In nm */
htrdr_combustion_laser_get_wavelength
(const struct htrdr_combustion_laser* laser);
-HTRDR_API double
+extern LOCAL_SYM double
htrdr_combustion_laser_compute_surface_plane_distance
(const struct htrdr_combustion_laser* laser,
const double pos[3]);