Skip to content

Commit dec8b78

Browse files
committed
[DL] configure dl-loader visibility
1 parent e400f8d commit dec8b78

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,14 @@ if (ALPAQA_WITH_DL)
204204
target_link_libraries(dl-loader
205205
PUBLIC alpaqa::alpaqa alpaqa::dl-api
206206
PRIVATE ${CMAKE_DL_LIBS} alpaqa::warnings)
207+
alpaqa_configure_visibility(dl-loader)
207208
set_target_properties(dl-loader PROPERTIES SOVERSION ${PROJECT_VERSION})
208209
add_library(alpaqa::dl-loader ALIAS dl-loader)
209210
list(APPEND ALPAQA_INSTALL_TARGETS dl-loader)
211+
generate_export_header(dl-loader
212+
EXPORT_FILE_NAME export/alpaqa/dl-loader-export.h)
213+
target_include_directories(dl-loader PUBLIC
214+
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/export>)
210215
endif()
211216

212217
if (ALPAQA_WITH_CUTEST AND CMAKE_DL_LIBS)

src/interop/dl/include/alpaqa/dl/dl-problem.hpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#pragma once
22

33
#include <alpaqa/config/config.hpp>
4+
#include <alpaqa/dl-loader-export.h>
45
#include <alpaqa/dl/dl-problem.h>
56
#include <alpaqa/problem/box-constr-problem.hpp>
67
#include <alpaqa/problem/sparsity.hpp>
@@ -90,7 +91,7 @@ class ExtraFuncs {
9091
/// @see @ref TypeErasedProblem
9192
/// @see @ref alpaqa_problem_functions_t
9293
/// @see @ref alpaqa_problem_register_t
93-
class DLProblem : public BoxConstrProblem<DefaultConfig> {
94+
class DL_LOADER_EXPORT DLProblem : public BoxConstrProblem<DefaultConfig> {
9495
public:
9596
USING_ALPAQA_CONFIG(DefaultConfig);
9697
using Sparsity = alpaqa::Sparsity<config_t>;
@@ -198,7 +199,7 @@ class DLProblem : public BoxConstrProblem<DefaultConfig> {
198199
///
199200
/// @ingroup grp_Problems
200201
/// @see @ref TypeErasedControlProblem
201-
class DLControlProblem {
202+
class DL_LOADER_EXPORT DLControlProblem {
202203
public:
203204
USING_ALPAQA_CONFIG(DefaultConfig);
204205
using Box = alpaqa::Box<config_t>;

0 commit comments

Comments
 (0)