소스 검색

allow physac to be built as a shared library (#2168)

if `BUILD_LIBTYPE_SHARED` is defined allow build as a shared dll
pull/2170/head
Novaleaf 3 년 전
committed by GitHub
부모
커밋
c5fc7c7640
No known key found for this signature in database GPG 키 ID: 4AEE18F83AFDEB23
1개의 변경된 파일10개의 추가작업 그리고 0개의 파일을 삭제
  1. +10
    -0
      src/extras/physac.h

+ 10
- 0
src/extras/physac.h 파일 보기

@ -72,6 +72,16 @@
#if !defined(PHYSAC_H) #if !defined(PHYSAC_H)
#define PHYSAC_H #define PHYSAC_H
// Function specifiers in case library is build/used as a shared library (Windows)
// NOTE: Microsoft specifiers to tell compiler that symbols are imported/exported from a .dll
#if defined(_WIN32)
#if defined(BUILD_LIBTYPE_SHARED)
#define PHYSACDEF __declspec(dllexport) // We are building the library as a Win32 shared library (.dll)
#elif defined(USE_LIBTYPE_SHARED)
#define PHYSACDEF __declspec(dllimport) // We are using the library as a Win32 shared library (.dll)
#endif
#endif
#ifndef PHYSACDEF #ifndef PHYSACDEF
#define PHYSACDEF // We are building or using physac as a static library #define PHYSACDEF // We are building or using physac as a static library
#endif #endif

불러오는 중...
취소
저장