summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
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 )