File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,9 +43,9 @@ if(CMAKE_CROSSCOMPILING)
4343 message (STATUS "UI: building llama-ui-embed with host compiler ${HOST_CXX_COMPILER} " )
4444
4545 if (CMAKE_HOST_WIN32 )
46- set (LLAMA_UI_EMBED_EXE "${CMAKE_CURRENT_BINARY_DIR } /llama-ui-embed.exe" )
46+ set (LLAMA_UI_EMBED_EXE "${CMAKE_CURRENT_BINARY_DIR } /llama-ui-embed-host .exe" )
4747 else ()
48- set (LLAMA_UI_EMBED_EXE "${CMAKE_CURRENT_BINARY_DIR } /llama-ui-embed" )
48+ set (LLAMA_UI_EMBED_EXE "${CMAKE_CURRENT_BINARY_DIR } /llama-ui-embed-host " )
4949 endif ()
5050
5151 add_custom_command (
@@ -56,6 +56,8 @@ if(CMAKE_CROSSCOMPILING)
5656 COMMENT "Building llama-ui-embed (host)"
5757 VERBATIM
5858 )
59+
60+ # phony target to tie it into the dependency graph
5961 add_custom_target (llama-ui-embed DEPENDS "${LLAMA_UI_EMBED_EXE} " )
6062else ()
6163 add_executable (llama-ui-embed embed.cpp )
@@ -93,6 +95,10 @@ add_library(${TARGET} STATIC ${UI_CPP} ${UI_H})
9395target_compile_features (${TARGET} PRIVATE cxx_std_17 )
9496add_dependencies (${TARGET} llama-ui-assets )
9597
98+ if (BUILD_SHARED_LIBS )
99+ set_target_properties (${TARGET} PROPERTIES POSITION_INDEPENDENT_CODE ON )
100+ endif ()
101+
96102target_include_directories (${TARGET} PUBLIC
97103 ${CMAKE_CURRENT_BINARY_DIR }
98104)
You can’t perform that action at this time.
0 commit comments