diff --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt index 55fb1a6ed3c43..015f2a9e22a83 100644 --- a/libcxx/src/CMakeLists.txt +++ b/libcxx/src/CMakeLists.txt @@ -259,12 +259,13 @@ if (LIBCXX_ENABLE_SHARED) endif() endif() +set(CMAKE_STATIC_LIBRARY_PREFIX "lib") + # Build the static library. if (LIBCXX_ENABLE_STATIC) add_library(cxx_static STATIC ${exclude_from_all} ${LIBCXX_SOURCES} ${LIBCXX_HEADERS}) target_link_libraries(cxx_static PUBLIC cxx-headers PRIVATE ${LIBCXX_LIBRARIES}) - set(CMAKE_STATIC_LIBRARY_PREFIX "lib") set_target_properties(cxx_static PROPERTIES COMPILE_FLAGS "${LIBCXX_COMPILE_FLAGS}"