Compatible with lower cmake version.
This commit is contained in:
parent
e68f8d5a3a
commit
ad2c3e2881
@ -1,20 +1,3 @@
|
|||||||
cmake_minimum_required(VERSION 3.27)
|
|
||||||
|
|
||||||
project(DataStructure)
|
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 20)
|
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
||||||
|
|
||||||
set(Projects_ROOT E:/Projects)
|
|
||||||
set(Libraries_ROOT ${Projects_ROOT}/Libraries)
|
|
||||||
|
|
||||||
set(BOOST_ROOT ${Libraries_ROOT}/boost_1_83_0_msvc2022_64bit)
|
|
||||||
set(Boost_INCLUDE_DIR ${BOOST_ROOT}/include/boost-1_83)
|
|
||||||
option(Boost_USE_STATIC_LIBS OFF)
|
|
||||||
add_compile_definitions(
|
|
||||||
BOOST_USE_WINAPI_VERSION=BOOST_WINAPI_VERSION_WIN10
|
|
||||||
)
|
|
||||||
|
|
||||||
add_library(DataStructure
|
add_library(DataStructure
|
||||||
Array.h
|
Array.h
|
||||||
ArrayList.h
|
ArrayList.h
|
||||||
|
@ -14,11 +14,16 @@ add_library(Universal
|
|||||||
StringUtility.h StringUtility.cpp
|
StringUtility.h StringUtility.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
cmake_path(GET CMAKE_CURRENT_SOURCE_DIR PARENT_PATH KYLIN_CORE_INCLUDE_PATH)
|
if(CMAKE_VERSION VERSION_LESS 3.20)
|
||||||
|
get_filename_component(KYLIN_CORE_INCLUDE_PATH ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY)
|
||||||
|
else()
|
||||||
|
cmake_path(GET CMAKE_CURRENT_SOURCE_DIR PARENT_PATH KYLIN_CORE_INCLUDE_PATH)
|
||||||
|
endif()
|
||||||
|
|
||||||
target_include_directories(Universal
|
target_include_directories(Universal
|
||||||
INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}
|
INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
INTERFACE ${KYLIN_CORE_INCLUDE_PATH}
|
INTERFACE ${KYLIN_CORE_INCLUDE_PATH}
|
||||||
|
PUBLIC ${Boost_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(Universal
|
target_link_libraries(Universal
|
||||||
|
Loading…
Reference in New Issue
Block a user