mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
disable dylib by default
This commit is contained in:
parent
ea2e16c931
commit
dc692a3835
@ -32,6 +32,7 @@ include_directories(${CMAKE_CURRENT_LIST_DIR}/include)
|
|||||||
aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/src POCKETPY_SRC)
|
aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/src POCKETPY_SRC)
|
||||||
|
|
||||||
option(PK_USE_BOX2D "Use Box2D" OFF)
|
option(PK_USE_BOX2D "Use Box2D" OFF)
|
||||||
|
option(PK_USE_DYLIB "Use dylib" OFF)
|
||||||
|
|
||||||
if(PK_USE_BOX2D)
|
if(PK_USE_BOX2D)
|
||||||
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/3rd/box2d)
|
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/3rd/box2d)
|
||||||
@ -65,7 +66,7 @@ else()
|
|||||||
target_link_libraries(${PROJECT_EXE_NAME} ${CMAKE_DL_LIBS})
|
target_link_libraries(${PROJECT_EXE_NAME} ${CMAKE_DL_LIBS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Emscripten")
|
if(PK_USE_DYLIB)
|
||||||
target_link_libraries(${PROJECT_NAME} ${CMAKE_DL_LIBS})
|
target_link_libraries(${PROJECT_NAME} ${CMAKE_DL_LIBS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -102,20 +102,32 @@ typedef struct tagBITMAPINFOHEADER {
|
|||||||
#define PK_SUPPORT_DYLIB 4
|
#define PK_SUPPORT_DYLIB 4
|
||||||
#elif TARGET_OS_MAC
|
#elif TARGET_OS_MAC
|
||||||
#define PK_SYS_PLATFORM "darwin"
|
#define PK_SYS_PLATFORM "darwin"
|
||||||
#include <dlfcn.h>
|
#ifdef PK_USE_DYLIB
|
||||||
#define PK_SUPPORT_DYLIB 2
|
#include <dlfcn.h>
|
||||||
|
#define PK_SUPPORT_DYLIB 2
|
||||||
|
#else
|
||||||
|
#define PK_SUPPORT_DYLIB 0
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
# error "Unknown Apple platform"
|
# error "Unknown Apple platform"
|
||||||
#endif
|
#endif
|
||||||
#define PK_EXPORT __attribute__((visibility("default")))
|
#define PK_EXPORT __attribute__((visibility("default")))
|
||||||
#elif __ANDROID__
|
#elif __ANDROID__
|
||||||
#include <dlfcn.h>
|
#ifdef PK_USE_DYLIB
|
||||||
#define PK_SUPPORT_DYLIB 3
|
#include <dlfcn.h>
|
||||||
|
#define PK_SUPPORT_DYLIB 3
|
||||||
|
#else
|
||||||
|
#define PK_SUPPORT_DYLIB 0
|
||||||
|
#endif
|
||||||
#define PK_EXPORT __attribute__((visibility("default")))
|
#define PK_EXPORT __attribute__((visibility("default")))
|
||||||
#define PK_SYS_PLATFORM "android"
|
#define PK_SYS_PLATFORM "android"
|
||||||
#elif __linux__
|
#elif __linux__
|
||||||
#include <dlfcn.h>
|
#ifdef PK_USE_DYLIB
|
||||||
#define PK_SUPPORT_DYLIB 2
|
#include <dlfcn.h>
|
||||||
|
#define PK_SUPPORT_DYLIB 2
|
||||||
|
#else
|
||||||
|
#define PK_SUPPORT_DYLIB 0
|
||||||
|
#endif
|
||||||
#define PK_EXPORT __attribute__((visibility("default")))
|
#define PK_EXPORT __attribute__((visibility("default")))
|
||||||
#define PK_SYS_PLATFORM "linux"
|
#define PK_SYS_PLATFORM "linux"
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user