From 26669f76e0db4d1c5ef59aaadad640ced333316b Mon Sep 17 00:00:00 2001 From: zhuzichu Date: Thu, 17 Aug 2023 12:38:44 +0800 Subject: [PATCH] update --- CMakeLists.txt | 3 ++- example/CMakeLists.txt | 6 +++--- src/CMakeLists.txt | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b681b3fd..58d1e4b5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,8 @@ cmake_minimum_required(VERSION 3.20) project(FluentUI VERSION 0.1 LANGUAGES CXX) -list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/.cmake/") +set(FLUENTUI_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}) +list(APPEND CMAKE_MODULE_PATH ${FLUENTUI_DIRECTORY}/.cmake/) include(GetGitRevisionDescription) diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 03c6a08c..7fdc5b1c 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -37,9 +37,9 @@ else() endif() ##生成版本信息头文件 -set(HEADER_FILE_VERSION_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../example/Version.h) +set(HEADER_FILE_VERSION_PATH ${FLUENTUI_DIRECTORY}/example/Version.h) configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/../.cmake/Version.h.in + ${FLUENTUI_DIRECTORY}/.cmake/Version.h.in ${HEADER_FILE_VERSION_PATH} ) @@ -69,7 +69,7 @@ set(EXAMPLE_VERSION_RC_PATH "") if(WIN32) set(EXAMPLE_VERSION_RC_PATH ${CMAKE_BINARY_DIR}/version_${PROJECT_NAME}.rc) configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/../.cmake/version_exe.rc.in + ${FLUENTUI_DIRECTORY}/.cmake/version_exe.rc.in ${EXAMPLE_VERSION_RC_PATH} ) endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f7aed8c7..e016d464 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -68,7 +68,7 @@ set(FLUENTUI_VERSION_RC_PATH "") if(WIN32) set(FLUENTUI_VERSION_RC_PATH ${CMAKE_BINARY_DIR}/version_${PROJECT_NAME}.rc) configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/../.cmake/version_dll.rc.in + ${FLUENTUI_DIRECTORY}/.cmake/version_dll.rc.in ${FLUENTUI_VERSION_RC_PATH} ) endif()