Fixed build flags for MacOS

This commit is contained in:
ksuprynowicz 2021-10-31 19:59:48 +01:00
parent 8f286205eb
commit 9221d33ed2

View file

@ -96,6 +96,7 @@ if( NOT WIN32 )
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/_env/VIRCADIA_OPTIMIZE.txt" "${VIRCADIA_OPTIMIZE}")
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
message("Clang compiler detected, adding -O3 -fPIC flags")
set(VIRCADIA_OPTIMIZE_FLAGS "-O3 -fPIC")
elseif (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
message("GCC compiler detected, adding -O3 -fPIC flags")
set(VIRCADIA_OPTIMIZE_FLAGS "-O3 -fPIC")