diff --git a/CMakeLists.txt b/CMakeLists.txt index 74c5a0a6b..dd63b7d45 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,6 +77,10 @@ if(POLICY CMP0072) cmake_policy(SET CMP0072 NEW) endif() +if(POLICY CMP0063) + cmake_policy(SET CMP0063 NEW) +endif() + if(MEGA) # LOVE_MSVC_DLLS contains runtime DLLs that should be bundled with the love # binary (in e.g. the installer). Example: msvcp140.dll. @@ -1950,6 +1954,7 @@ if(ANDROID) endif() add_library(${LOVE_LIB_NAME} SHARED ${LOVE_LIB_SRC} ${LOVE_RC}) +set_target_properties(${LOVE_LIB_NAME} PROPERTIES C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON) target_link_libraries(${LOVE_LIB_NAME} ${LOVE_LINK_LIBRARIES} ${LOVE_3P}) if(LOVE_EXTRA_DEPENDECIES) @@ -1967,6 +1972,7 @@ endif() if(NOT ANDROID) add_executable(${LOVE_EXE_NAME} WIN32 src/love.cpp ${LOVE_RC}) target_link_libraries(${LOVE_EXE_NAME} ${LOVE_LIB_NAME}) + set_target_properties(${LOVE_EXE_NAME} PROPERTIES C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON) if(MSVC) add_executable(${LOVE_CONSOLE_EXE_NAME} src/love.cpp ${LOVE_RC})