diff options
| author | jussi | 2024-08-20 19:32:38 +0300 |
|---|---|---|
| committer | jussi | 2024-08-20 19:32:38 +0300 |
| commit | af2bf6f7a248d9b6e78305b4ac9dbc72d2d41ef0 (patch) | |
| tree | 7a78412fb93af985337ef0fe94f620b02f647c31 /CMakeLists.txt | |
| parent | 3cb6567bda27387f0727ba32084429bc27c40502 (diff) | |
| download | reilua-enhanced-af2bf6f7a248d9b6e78305b4ac9dbc72d2d41ef0.tar.gz reilua-enhanced-af2bf6f7a248d9b6e78305b4ac9dbc72d2d41ef0.tar.bz2 reilua-enhanced-af2bf6f7a248d9b6e78305b4ac9dbc72d2d41ef0.zip | |
Expose dynamic symbols build option.
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a38a2b9..088d3e9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,6 +13,7 @@ set( CMAKE_C_STANDARD 99 ) # Requires C99 standard option( SHARED "Build using dynamic libraries." off ) option( LUAJIT "Use LuaJIT." off ) option( LUA_EVENTS "Enable Lua event callbacks (RL.event)." off ) +option( DYNAMIC_SYMBOLS "Expose dynamic symbols with rdynamic." off ) enum_option( PLATFORM "Desktop;Desktop_SDL;Web" "Platform to build for." ) @@ -38,6 +39,10 @@ if( LUA_EVENTS ) set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DLUA_EVENTS" ) endif() +if( DYNAMIC_SYMBOLS ) + set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -rdynamic" ) +endif() + if( PLATFORM STREQUAL "Web" ) target_link_libraries( ${PROJECT_NAME} ${CMAKE_SOURCE_DIR}/lib/web/libraylib.a ) target_link_libraries( ${PROJECT_NAME} ${CMAKE_SOURCE_DIR}/lib/web/liblua.a ) @@ -75,8 +80,6 @@ else() # Desktop if( UNIX ) set( CMAKE_C_COMPILER "gcc" ) - # set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall" ) - if ( PLATFORM MATCHES "Desktop_SDL" ) include( FindPkgConfig ) pkg_search_module( SDL2 REQUIRED sdl2 ) |
