提交 ad2fff9f 编写于 作者: H Hui Zhang

fix cmake

上级 d7ca8bda
export MAIN_ROOT=${PWD} export MAIN_ROOT=${PWD}
export PATH=${MAIN_ROOT}:${MAIN_ROOT}/utils:${PATH} export PATH=${MAIN_ROOT}:${MAIN_ROOT}/utils:/usr/local/bin:${PATH}
export LC_ALL=C export LC_ALL=C
# Use UTF-8 in Python to avoid UnicodeDecodeError when LC_ALL=C # Use UTF-8 in Python to avoid UnicodeDecodeError when LC_ALL=C
......
...@@ -16,41 +16,41 @@ set(CMAKE_VERBOSE_MAKEFILE on) ...@@ -16,41 +16,41 @@ set(CMAKE_VERBOSE_MAKEFILE on)
set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD 14)
# fc_patch dir # # fc_patch dir
set(FETCHCONTENT_QUIET off) # set(FETCHCONTENT_QUIET off)
get_filename_component(fc_patch "fc_patch" REALPATH BASE_DIR "${CMAKE_SOURCE_DIR}") # get_filename_component(fc_patch "fc_patch" REALPATH BASE_DIR "${CMAKE_SOURCE_DIR}")
set(FETCHCONTENT_BASE_DIR ${fc_patch}) # set(FETCHCONTENT_BASE_DIR ${fc_patch})
#
#
############################################################################### # ###############################################################################
# Option Configurations # # Option Configurations
############################################################################### # ###############################################################################
# option configurations # # option configurations
option(TEST_DEBUG "option for debug" OFF) # option(TEST_DEBUG "option for debug" OFF)
#
#
############################################################################### # ###############################################################################
# Add local library # # Add local library
############################################################################### # ###############################################################################
# system lib # # system lib
find_package() # find_package()
# if dir have CmakeLists.txt # # if dir have CmakeLists.txt
add_subdirectory() # add_subdirectory()
# if dir do not have CmakeLists.txt # # if dir do not have CmakeLists.txt
add_library(lib_name STATIC file.cc) # add_library(lib_name STATIC file.cc)
target_link_libraries(lib_name item0 item1) # target_link_libraries(lib_name item0 item1)
add_dependencies(lib_name depend-target) # add_dependencies(lib_name depend-target)
#
#
############################################################################### # ###############################################################################
# Library installation # # Library installation
############################################################################### # ###############################################################################
install() # install()
#
#
############################################################################### # ###############################################################################
# Build binary file # # Build binary file
############################################################################### # ###############################################################################
add_executable() # add_executable()
target_link_libraries() # target_link_libraries()
#
...@@ -190,9 +190,8 @@ endif() ...@@ -190,9 +190,8 @@ endif()
########################### include third_party according to flags ############################### ########################### include third_party according to flags ###############################
include(third_party/libsndfile) # download, build, install libsndfile include(third_party/libsndfile) # download, build, install libsndfile
include(third_party/zlib) # download, build, install zlib
include(third_party/boost) # download boost include(third_party/boost) # download boost
include(third_party/eigen) # download eigen3 include(third_party/eigen) # download eigen3
include(third_party/threadpool)# download threadpool include(third_party/threadpool) # download threadpool
cmake_minimum_required(VERSION 3.14) cmake_minimum_required(VERSION 3.14)
include(ExternalProject)
include(FetchContent) include(FetchContent)
FetchContent_Declare( FetchContent_Declare(
......
cmake_minimum_required(VERSION 3.14) cmake_minimum_required(VERSION 3.14)
include(ExternalProject)
include(FetchContent) include(FetchContent)
FetchContent_Declare( FetchContent_Declare(
......
cmake_minimum_required(VERSION 3.14) cmake_minimum_required(VERSION 3.14)
include(ExternalProject)
include(FetchContent) include(FetchContent)
FetchContent_Declare( FetchContent_Declare(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册