mirror of https://github.com/bjornbytes/lovr.git
Use -fvisibility=hidden to hide symbols by default;
This saves some space, and it's better to be conscious about symbol exports.
This commit is contained in:
parent
c0cc4fbd85
commit
2dea0eacfb
|
@ -1,4 +1,5 @@
|
||||||
cmake_minimum_required(VERSION 3.1.0)
|
cmake_minimum_required(VERSION 3.1.0)
|
||||||
|
cmake_policy(SET CMP0063 NEW)
|
||||||
project(lovr)
|
project(lovr)
|
||||||
|
|
||||||
# Options
|
# Options
|
||||||
|
@ -319,6 +320,7 @@ else()
|
||||||
add_executable(lovr ${LOVR_SRC})
|
add_executable(lovr ${LOVR_SRC})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set_target_properties(lovr PROPERTIES C_VISIBILITY_PRESET default)
|
||||||
set_target_properties(lovr PROPERTIES C_STANDARD 99)
|
set_target_properties(lovr PROPERTIES C_STANDARD 99)
|
||||||
target_include_directories(lovr PRIVATE src)
|
target_include_directories(lovr PRIVATE src)
|
||||||
target_link_libraries(lovr
|
target_link_libraries(lovr
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
// Functions on the Lovr side of the wall, called from the Oculus side of the wall.
|
// Functions on the Lovr side of the wall, called from the Oculus side of the wall.
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "../util.h"
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
// What's going on here:
|
// What's going on here:
|
||||||
|
@ -81,18 +82,17 @@ typedef struct {
|
||||||
BridgeLovrDevice deviceType;
|
BridgeLovrDevice deviceType;
|
||||||
} BridgeLovrInitData;
|
} BridgeLovrInitData;
|
||||||
|
|
||||||
void bridgeLovrInit(BridgeLovrInitData *initData);
|
LOVR_EXPORT void bridgeLovrInit(BridgeLovrInitData *initData);
|
||||||
|
|
||||||
void bridgeLovrUpdate(BridgeLovrUpdateData *updateData);
|
LOVR_EXPORT void bridgeLovrUpdate(BridgeLovrUpdateData *updateData);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int eye;
|
int eye;
|
||||||
int framebuffer;
|
int framebuffer;
|
||||||
} BridgeLovrDrawData;
|
} BridgeLovrDrawData;
|
||||||
|
|
||||||
void bridgeLovrDraw(BridgeLovrDrawData *drawData);
|
LOVR_EXPORT void bridgeLovrDraw(BridgeLovrDrawData *drawData);
|
||||||
|
|
||||||
void bridgeLovrPaused(bool paused);
|
LOVR_EXPORT void bridgeLovrPaused(bool paused);
|
||||||
|
|
||||||
void bridgeLovrClose();
|
|
||||||
|
|
||||||
|
LOVR_EXPORT void bridgeLovrClose();
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define LOVR_EXPORT __declspec(dllexport)
|
#define LOVR_EXPORT __declspec(dllexport)
|
||||||
#else
|
#else
|
||||||
#define LOVR_EXPORT
|
#define LOVR_EXPORT __attribute__((visibility("default")))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _Noreturn
|
#ifndef _Noreturn
|
||||||
|
|
Loading…
Reference in New Issue