Commit dedbec97b0273c91863c15ba0f752904caabc495
1 parent
40459055
a better way of disabling symbols
Showing
3 changed files
with
21 additions
and
13 deletions
app/CMakeLists.txt
| 1 | # Build the command line interface | 1 | # Build the command line interface |
| 2 | -add_subdirectory(br) | ||
| 3 | - | ||
| 4 | if(NOT BR_PACKAGE_THIRDPARTY) | 2 | if(NOT BR_PACKAGE_THIRDPARTY) |
| 5 | if(NOT BR_EMBEDDED) | 3 | if(NOT BR_EMBEDDED) |
| 4 | + add_subdirectory(br) | ||
| 5 | + | ||
| 6 | # Build examples/tests | 6 | # Build examples/tests |
| 7 | add_subdirectory(examples) | 7 | add_subdirectory(examples) |
| 8 | 8 |
openbr/CMakeLists.txt
| @@ -53,8 +53,12 @@ install(TARGETS openbr | @@ -53,8 +53,12 @@ install(TARGETS openbr | ||
| 53 | RUNTIME DESTINATION bin | 53 | RUNTIME DESTINATION bin |
| 54 | LIBRARY DESTINATION lib | 54 | LIBRARY DESTINATION lib |
| 55 | ARCHIVE DESTINATION lib) | 55 | ARCHIVE DESTINATION lib) |
| 56 | -file(GLOB HEADERS *.h) | ||
| 57 | -install(FILES ${HEADERS} DESTINATION include/openbr) | 56 | + |
| 57 | +if(NOT BR_EMBEDDED) | ||
| 58 | + file(GLOB HEADERS *.h) | ||
| 59 | + install(FILES ${HEADERS} DESTINATION include/openbr) | ||
| 60 | +endif() | ||
| 61 | + | ||
| 58 | include(InstallDependencies) | 62 | include(InstallDependencies) |
| 59 | install_compiler_libraries() | 63 | install_compiler_libraries() |
| 60 | install_qt_libraries(QT_DEPENDENCIES) | 64 | install_qt_libraries(QT_DEPENDENCIES) |
openbr/openbr_export.h
| @@ -17,17 +17,21 @@ | @@ -17,17 +17,21 @@ | ||
| 17 | #ifndef OPENBR_EXPORT_H | 17 | #ifndef OPENBR_EXPORT_H |
| 18 | #define OPENBR_EXPORT_H | 18 | #define OPENBR_EXPORT_H |
| 19 | 19 | ||
| 20 | -#if defined BR_LIBRARY | ||
| 21 | -# if defined _WIN32 || defined __CYGWIN__ | ||
| 22 | -# define BR_EXPORT __declspec(dllexport) | ||
| 23 | -# else | ||
| 24 | -# define BR_EXPORT __attribute__((visibility("default"))) | ||
| 25 | -# endif | 20 | +#if defined BR_EMBEDDED |
| 21 | +# define BR_EXPORT | ||
| 26 | #else | 22 | #else |
| 27 | -# if defined _WIN32 || defined __CYGWIN__ | ||
| 28 | -# define BR_EXPORT __declspec(dllimport) | 23 | +# if defined BR_LIBRARY |
| 24 | +# if defined _WIN32 || defined __CYGWIN__ | ||
| 25 | +# define BR_EXPORT __declspec(dllexport) | ||
| 26 | +# else | ||
| 27 | +# define BR_EXPORT __attribute__((visibility("default"))) | ||
| 28 | +# endif | ||
| 29 | # else | 29 | # else |
| 30 | -# define BR_EXPORT | 30 | +# if defined _WIN32 || defined __CYGWIN__ |
| 31 | +# define BR_EXPORT __declspec(dllimport) | ||
| 32 | +# else | ||
| 33 | +# define BR_EXPORT | ||
| 34 | +# endif | ||
| 31 | # endif | 35 | # endif |
| 32 | #endif | 36 | #endif |
| 33 | 37 |