forked from premiere/premiere-libtorrent
CMake build: Modify CMAKE_CXX_FLAGS based on itself, not C flags.
Also, only use linker visibility when building shared.
This commit is contained in:
parent
baa9f86407
commit
f865fac7d9
|
@ -215,15 +215,14 @@ else()
|
||||||
add_definitions(-DTORRENT_DISABLE_DHT)
|
add_definitions(-DTORRENT_DISABLE_DHT)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT MSVC)
|
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -fvisibility-inlines-hidden")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (shared)
|
if (shared)
|
||||||
add_definitions(-DTORRENT_BUILDING_SHARED)
|
add_definitions(-DTORRENT_BUILDING_SHARED)
|
||||||
add_library(torrent-rasterbar SHARED ${sources2})
|
add_library(torrent-rasterbar SHARED ${sources2})
|
||||||
else (shared)
|
if(NOT MSVC)
|
||||||
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
if(static_runtime)
|
if(static_runtime)
|
||||||
# fix /MT flag:
|
# fix /MT flag:
|
||||||
set(CompilerFlags
|
set(CompilerFlags
|
||||||
|
|
Loading…
Reference in New Issue