Skip to content

Commit

Permalink
add unstaged changes
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj committed Aug 2, 2023
1 parent c558ef4 commit 294b3d0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 deletions.
18 changes: 17 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ include(CheckIncludeFileCXX)
check_include_file_cxx(alsa/asoundlib.h SHERPA_NCNN_HAS_ALSA)
if(SHERPA_NCNN_HAS_ALSA)
add_definitions(-DSHERPA_NCNN_ENABLE_ALSA=1)
else()
elseif(UNIX AND NOT APPLE)
message(WARNING "\
Could not find alsa/asoundlib.h !
We won't build sherpa-ncnn-alsa
Expand Down Expand Up @@ -143,3 +143,19 @@ endif()
if(SHERPA_NCNN_ENABLE_C_API AND SHERPA_NCNN_ENABLE_BINARY)
add_subdirectory(c-api-examples)
endif()


set(SHERPA_NCNN_PKG_CONFIG_EXTRA_LIBS)

if(APPLE AND NOT BUILD_SHARED_LIBS)
set(SHERPA_NCNN_PKG_CONFIG_EXTRA_LIBS "-lomp -lc++")
endif()

# See https://people.freedesktop.org/~dbn/pkg-config-guide.html
configure_file(cmake/sherpa-ncnn.pc.in ${PROJECT_BINARY_DIR}/sherpa-ncnn.pc @ONLY)
install(
FILES
${PROJECT_BINARY_DIR}/sherpa-ncnn.pc
DESTINATION
.
)
2 changes: 1 addition & 1 deletion sherpa-ncnn/c-api/c-api.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ extern "C" {
#define SHERPA_NCNN_IMPORT
#endif
#else // WIN32
#define SHERPA_NCNN_EXPORT __attribute__((__visibility__("default")))
#define SHERPA_NCNN_EXPORT
#define SHERPA_NCNN_IMPORT SHERPA_NCNN_EXPORT
#endif

Expand Down
12 changes: 0 additions & 12 deletions sherpa-ncnn/csrc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,6 @@ if(NOT SHERPA_NCNN_ENABLE_PYTHON)
install(TARGETS sherpa-ncnn-microphone DESTINATION bin)
endif()

set(hdrs
features.h
model.h
recognizer.h
symbol-table.h
wave-reader.h
)

install(FILES ${hdrs}
DESTINATION include/sherpa-ncnn/csrc
)

if(SHERPA_NCNN_ENABLE_GENERATE_INT8_SCALE_TABLE)
add_executable(generate-int8-scale-table generate-int8-scale-table.cc)
target_link_libraries(generate-int8-scale-table sherpa-ncnn-core)
Expand Down

0 comments on commit 294b3d0

Please sign in to comment.