File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -24,19 +24,20 @@ option(ENABLE_EXTRA "Enable extra encodings and features." OFF)
2424# Set C++ standard
2525set (CMAKE_CXX_STANDARD 11)
2626
27+ # ----------------------------------------------------------------------------------
28+ # Import build-aux subdirectory.
2729if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR} /build-aux" )
2830 set (BUILD_AUX "${CMAKE_CURRENT_SOURCE_DIR} /build-aux" )
31+ add_subdirectory ("${BUILD_AUX} " )
32+ message (STATUS "Using '${BUILD_AUX} ' for C++ Plus build-aux directory." )
2933elseif (EXISTS "${CMAKE_CURRENT_SOURCE_DIR} /../build-aux" )
3034 set (BUILD_AUX "${CMAKE_CURRENT_SOURCE_DIR} /../build-aux" )
3135else ()
3236 message (FATAL_ERROR "CMake build-aux directory is not exists, try to execute 'setup.cmd' or './setup.sh' to get it." )
3337endif ()
34- set (AUX_DIR "${BUILD_AUX} /cmake" )
35-
36- message (STATUS "Using '${BUILD_AUX} ' for C++ Plus build-aux directory." )
37- add_subdirectory ("${BUILD_AUX} " "${CMAKE_CURRENT_SOURCE_DIR} " )
38-
39- include ("${AUX_DIR} /cppp.cmake" )
38+ get_filename_component (BUILD_AUX "${BUILD_AUX} " ABSOLUTE )
39+ include ("${BUILD_AUX} /cmake/cppp.cmake" )
40+ # ----------------------------------------------------------------------------------
4041
4142check_have_visibility()
4243
Original file line number Diff line number Diff line change 112023-08-24 ChenPi11 <wushengwuxi-msctinoulk@outlook.com>
22
33 Fix subdirectory import bug.
4+ Optimize the way to import build-aux.
45
562023-08-23 ChenPi11 <wushengwuxi-msctinoulk@outlook.com>
67
You can’t perform that action at this time.
0 commit comments