Spaces:
Sleeping
Sleeping
bandoti
commited on
Commit
·
8fdd994
1
Parent(s):
22e1593
Add required ggml-base and backend libs to cmake pkg (llama/10407)
Browse files- ggml/CMakeLists.txt +2 -6
- ggml/src/CMakeLists.txt +1 -1
ggml/CMakeLists.txt
CHANGED
|
@@ -234,12 +234,8 @@ set_target_properties(ggml PROPERTIES PUBLIC_HEADER "${GGML_PUBLIC_HEADERS}")
|
|
| 234 |
#if (GGML_METAL)
|
| 235 |
# set_target_properties(ggml PROPERTIES RESOURCE "${CMAKE_CURRENT_SOURCE_DIR}/src/ggml-metal.metal")
|
| 236 |
#endif()
|
| 237 |
-
install(TARGETS ggml PUBLIC_HEADER)
|
| 238 |
-
|
| 239 |
-
if (BUILD_SHARED_LIBS)
|
| 240 |
-
install(TARGETS ggml LIBRARY)
|
| 241 |
-
install(TARGETS ggml-base LIBRARY)
|
| 242 |
-
endif()
|
| 243 |
|
| 244 |
# FIXME: this should be done in the backend cmake files
|
| 245 |
if (GGML_METAL)
|
|
|
|
| 234 |
#if (GGML_METAL)
|
| 235 |
# set_target_properties(ggml PROPERTIES RESOURCE "${CMAKE_CURRENT_SOURCE_DIR}/src/ggml-metal.metal")
|
| 236 |
#endif()
|
| 237 |
+
install(TARGETS ggml LIBRARY PUBLIC_HEADER)
|
| 238 |
+
install(TARGETS ggml-base LIBRARY)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 239 |
|
| 240 |
# FIXME: this should be done in the backend cmake files
|
| 241 |
if (GGML_METAL)
|
ggml/src/CMakeLists.txt
CHANGED
|
@@ -239,8 +239,8 @@ function(ggml_add_backend backend)
|
|
| 239 |
if (${BUILD_SHARED_LIBS})
|
| 240 |
target_compile_definitions(${backend_target} PRIVATE GGML_BACKEND_BUILD)
|
| 241 |
target_compile_definitions(${backend_target} PUBLIC GGML_BACKEND_SHARED)
|
| 242 |
-
install(TARGETS ${backend_target} LIBRARY)
|
| 243 |
endif()
|
|
|
|
| 244 |
target_link_libraries(ggml PUBLIC ${backend_target})
|
| 245 |
string(TOUPPER "GGML_USE_${backend}" backend_use)
|
| 246 |
target_compile_definitions(ggml PUBLIC ${backend_use})
|
|
|
|
| 239 |
if (${BUILD_SHARED_LIBS})
|
| 240 |
target_compile_definitions(${backend_target} PRIVATE GGML_BACKEND_BUILD)
|
| 241 |
target_compile_definitions(${backend_target} PUBLIC GGML_BACKEND_SHARED)
|
|
|
|
| 242 |
endif()
|
| 243 |
+
install(TARGETS ${backend_target} LIBRARY)
|
| 244 |
target_link_libraries(ggml PUBLIC ${backend_target})
|
| 245 |
string(TOUPPER "GGML_USE_${backend}" backend_use)
|
| 246 |
target_compile_definitions(ggml PUBLIC ${backend_use})
|