diff --git a/CMakeLists.txt b/CMakeLists.txt index 764bb5e166..69ed9b1b40 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,11 +16,6 @@ include(Pcsx2Utils) # Detect current OS detectOperatingSystem() -# These lines remove some defaults options that can cause some failure later. -# In particular, it remove the build option -rdynamic on pcsx2 -SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS " ") -SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS " ") - #------------------------------------------------------------------------------- # Include specific module # BuildParameters Must be done before SearchForStuff diff --git a/cmake/BuildParameters.cmake b/cmake/BuildParameters.cmake index 37922b1178..4645b0b1ee 100644 --- a/cmake/BuildParameters.cmake +++ b/cmake/BuildParameters.cmake @@ -7,6 +7,22 @@ # Use zlib internal lib: -DFORCE_INTERNAL_ZLIB=TRUE #------------------------------------------------------------------------------- +### Cmake set default value for various compilation variable +### Here the list of default value for documentation purpose +# ${CMAKE_SHARED_LIBRARY_CXX_FLAGS} = "-fPIC" +# ${CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS} = "-rdynamic" +# +# Use in debug mode +# ${CMAKE_CXX_FLAGS_DEBUG} = "-g" +# Use in release mode +# ${CMAKE_CXX_FLAGS_RELEASE} = "-O3 -DNDEBUG" + +#------------------------------------------------------------------------------- +# Remove bad default option +#------------------------------------------------------------------------------- +# Remove -rdynamic option that can some segmentation fault when openining pcsx2 plugins +SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS " ") +SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS " ") #------------------------------------------------------------------------------- # if no build type is set, use Devel as default