diff options
| author | RichardYCJ <[email protected]> | 2023-03-11 11:05:21 +0800 |
|---|---|---|
| committer | RichardYCJ <[email protected]> | 2023-03-11 11:05:21 +0800 |
| commit | 93414e26be225cab3dba7cec13190ce8be04eb14 (patch) | |
| tree | de1dfde5c2eeb7de22a8b6621180b9d4905edb80 | |
| parent | 8355798b9a065b8c4e0eed31214205cedb06b766 (diff) | |
fix cmake::find_package, rename flags to include_directories
| -rw-r--r-- | xmake/modules/package/manager/cmake/configurations.lua | 14 | ||||
| -rw-r--r-- | xmake/modules/package/manager/cmake/find_package.lua | 4 |
2 files changed, 9 insertions, 9 deletions
diff --git a/xmake/modules/package/manager/cmake/configurations.lua b/xmake/modules/package/manager/cmake/configurations.lua index 71113710b..3cc597a93 100644 --- a/xmake/modules/package/manager/cmake/configurations.lua +++ b/xmake/modules/package/manager/cmake/configurations.lua @@ -22,13 +22,13 @@ function main() return { - link_libraries = {description = "Set the cmake package dependencies, e.g. {\"abc::lib1\", \"abc::lib2\"}"}, - include_dirs = {description = "Set the cmake package include directories, e.g. {\"${ZLIB_INCLUDE_DIRS}\"}"}, - search_mode = {description = "Set the cmake package search mode, e.g. {\"config\", \"module\"}"}, - components = {description = "Set the cmake package components, e.g. {\"regex\", \"system\"}"}, - moduledirs = {description = "Set the cmake modules directories."}, - presets = {description = "Set the preset values, e.g. {Boost_USE_STATIC_LIB = true}"}, - envs = {description = "Set the run environments of cmake, e.g. {CMAKE_PREFIX_PATH = \"xxx\"}"}, + link_libraries = {description = "Set the cmake package dependencies, e.g. {\"abc::lib1\", \"abc::lib2\"}"}, + include_directories = {description = "Set the cmake package include directories, e.g. {\"${ZLIB_INCLUDE_DIRS}\"}"}, + search_mode = {description = "Set the cmake package search mode, e.g. {\"config\", \"module\"}"}, + components = {description = "Set the cmake package components, e.g. {\"regex\", \"system\"}"}, + moduledirs = {description = "Set the cmake modules directories."}, + presets = {description = "Set the preset values, e.g. {Boost_USE_STATIC_LIB = true}"}, + envs = {description = "Set the run environments of cmake, e.g. {CMAKE_PREFIX_PATH = \"xxx\"}"}, } end diff --git a/xmake/modules/package/manager/cmake/find_package.lua b/xmake/modules/package/manager/cmake/find_package.lua index 503259b46..f97118128 100644 --- a/xmake/modules/package/manager/cmake/find_package.lua +++ b/xmake/modules/package/manager/cmake/find_package.lua @@ -83,8 +83,8 @@ function _find_package(cmake, name, opt) cmakefile:print(" add_executable(%s test.cpp)", testname) -- setup include directories local includedirs = "" - if configs.include_dirs then - includedirs = table.concat(table.wrap(configs.include_dirs), " ") + if configs.include_directories then + includedirs = table.concat(table.wrap(configs.include_directories), " ") else includedirs = ("${%s_INCLUDE_DIR} ${%s_INCLUDE_DIRS}"):format(name, name) includedirs = includedirs .. (" ${%s_INCLUDE_DIR} ${%s_INCLUDE_DIRS}"):format(name:upper(), name:upper()) |
