@@ -7,28 +7,13 @@ find_package(Llama 0.0.1 REQUIRED)
7
7
# Bake common functionality in with target. Because applications
8
8
# using the relocatable Llama package should be outside of the
9
9
# source tree, main-cmake-pkg pretends the dependencies are built-in.
10
-
11
10
set (_common_path "${CMAKE_CURRENT_LIST_DIR} /../../common" )
12
- add_library (common OBJECT
13
- ${_common_path} /common.h
14
- ${_common_path} /common.cpp
15
- ${_common_path} /console.h
16
- ${_common_path} /console.cpp
17
- ${_common_path} /grammar-parser.h
18
- ${_common_path} /grammar-parser.cpp
19
- ${_common_path} /sampling.h
20
- ${_common_path} /sampling.cpp
21
- )
22
-
23
- # WARNING: because build-info.h is auto-generated, it will only
24
- # be available after the user has built the llama.cpp sources.
25
- #
26
- configure_file (${_common_path} /../build-info.h
27
- ${CMAKE_CURRENT_BINARY_DIR} /build-info.h
28
- COPYONLY )
29
-
30
- target_include_directories (common PUBLIC ${LLAMA_INCLUDE_DIR}
31
- ${CMAKE_CURRENT_BINARY_DIR} )
11
+ add_library (common OBJECT )
12
+ file (GLOB _common_files
13
+ "${_common_path} /*.h"
14
+ "${_common_path} /*.cpp"
15
+ )
16
+ target_sources (common PRIVATE ${_common_files} )
32
17
33
18
# If the common project was part of "main-cmake-pkg" the transient
34
19
# defines would automatically be attached. Because the common func-
0 commit comments