mirror of
https://github.com/x-tools-author/x-tools.git
synced 2025-09-15 15:28:40 +08:00
Compare commits
2 Commits
26ac9e3c69
...
02c637ae25
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
02c637ae25 | ||
|
|
bc9685b8ed |
3
.gitignore
vendored
3
.gitignore
vendored
@ -25,4 +25,5 @@ compile_commands.json
|
||||
libs
|
||||
bin
|
||||
scripts
|
||||
xapps/xprivate
|
||||
xapps/xprivate
|
||||
.DS_Store
|
||||
|
||||
@ -276,7 +276,17 @@ endfunction()
|
||||
# --------------------------------------------------------------------------------------------------
|
||||
# Deploy Qt for macOS
|
||||
function(x_deploy_qt_for_mac target)
|
||||
# Do nothing...
|
||||
if(NOT DEFINED MACDEPLOYQT_EXECUTABLE)
|
||||
return()
|
||||
endif()
|
||||
|
||||
message(STATUS "Target path of macOS is: $<TARGET_FILE:${target}>")
|
||||
add_custom_command(
|
||||
TARGET ${target}
|
||||
POST_BUILD
|
||||
COMMAND ${MACDEPLOYQT_EXECUTABLE} "$<TARGET_FILE:${target}>/../../../"
|
||||
COMMENT "Deploy Qt for macOS..."
|
||||
VERBATIM)
|
||||
endfunction()
|
||||
|
||||
# --------------------------------------------------------------------------------------------------
|
||||
@ -290,10 +300,10 @@ endfunction()
|
||||
function(x_deploy_qt target)
|
||||
if(WIN32)
|
||||
x_deploy_qt_for_windows(${target})
|
||||
elseif(UNIX AND NOT APPLE)
|
||||
x_deploy_qt_for_linux(${target})
|
||||
elseif(APPLE)
|
||||
x_deploy_qt_for_mac(${target})
|
||||
elseif(UNIX)
|
||||
x_deploy_qt_for_linux(${target})
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
|
||||
@ -89,6 +89,22 @@ if(WIN32)
|
||||
link_directories(${lib_dir})
|
||||
list(APPEND X_LIBS "libiconv-static")
|
||||
set(X_ICONV_LIBS "libiconv-static")
|
||||
elseif(APPLE)
|
||||
set(working_dir ${CMAKE_SOURCE_DIR}/3rd/${file_name})
|
||||
if(NOT EXISTS ${working_dir}/out/lib/libiconv.la)
|
||||
execute_process(COMMAND ./configure --prefix=${working_dir}/out
|
||||
WORKING_DIRECTORY ${working_dir})
|
||||
execute_process(COMMAND make WORKING_DIRECTORY ${working_dir})
|
||||
execute_process(COMMAND make install WORKING_DIRECTORY ${working_dir})
|
||||
endif()
|
||||
|
||||
if(EXISTS ${working_dir}/out/lib/libiconv.la)
|
||||
add_compile_definitions(X_ENABLE_ICONV)
|
||||
include_directories(${working_dir}/out/include)
|
||||
link_directories(${working_dir}/out/lib)
|
||||
list(APPEND X_LIBS "charset" "iconv")
|
||||
set(X_ICONV_LIBS "charset;iconv")
|
||||
endif()
|
||||
else()
|
||||
set(working_dir ${CMAKE_SOURCE_DIR}/3rd/${file_name})
|
||||
if(NOT EXISTS ${working_dir}/out/lib/libiconv.so)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user