28 lines
1.2 KiB
CMake
28 lines
1.2 KiB
CMake
set(OUTP "${CMAKE_BINARY_DIR}/bin/FluentUI")
|
|
set(BUILDBIN_PATH "${OUTP}")
|
|
set(QTQMLFLUENT_PATH "${QT_INSTALL_QML}/FluentUI")
|
|
set(PRESET_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build-preset")
|
|
set(SOLIBFILE_PATH "${CMAKE_BINARY_DIR}/libFluentUI.so")
|
|
set(ANDROID NO)
|
|
if (ANDROID)
|
|
set(ANDROID YES)
|
|
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${OUTP})
|
|
else()
|
|
set(CMAKE_INSTALL_PREFIX "${OUTP}")
|
|
endif()
|
|
set(SHAREDSCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/win_install.bat SHARED ${CMAKE_CURRENT_SOURCE_DIR} ${PRESET_PATH} ${BUILDBIN_PATH} ${QTQMLFLUENT_PATH} ${ANDROID} ${SOLIBFILE_PATH})
|
|
set(STATICSCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/win_install.bat STATIC ${CMAKE_CURRENT_SOURCE_DIR} ${PRESET_PATH} ${BUILDBIN_PATH} ${QTQMLFLUENT_PATH} ${ANDROID} ${SOLIBFILE_PATH})
|
|
string(REPLACE "/" "\\" SHAREDSCRIPT "${SHAREDSCRIPT}")
|
|
string(REPLACE "/" "\\" STATICSCRIPT "${STATICSCRIPT}")
|
|
if (${TARGET_TYPE} STREQUAL "SHARED")
|
|
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
|
|
COMMAND ${SHAREDSCRIPT}
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
)
|
|
else()
|
|
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
|
|
COMMAND ${STATICSCRIPT}
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
)
|
|
endif()
|