无法理解这个特定的CmakeLists.txt

时间:2015-11-11 01:50:27

标签: cmake

我正在尝试编译我的第一个VST插件。我已经采用simple VST project from GitHub并试图将其分解并理解所有内容,自己重写,然后编译它。

我目前正在分解CmakeLists.txt文件。我找到了一条我不明白的路线。

TARGET_LINK_LIBRARIES(gijzelijzer
    ${VSTSDK_LIBRARIES}
)

我不知道VST_LIBRARIES变量是什么。它未在CmakeList.txt中的任何其他位置声明。这是一个破碎的cmake文件,还是我不了解这里正在发生的语法。我只是简单地不明白这里发生了什么。

PROJECT(GIJZELIJZER)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
SET(CMAKE_COLOR_MAKEFILE ON)

IF (MSVC)
    ADD_DEFINITIONS(/D _CRT_SECURE_NO_WARNINGS)
ENDIF()

#-------------------------------------------------------------------------------
# Find 3rd party libs
#-------------------------------------------------------------------------------
SET(VSTSDK_PATH ${GIJZELIJZER_SOURCE_DIR}/../vstsdk2.4 CACHE PATH "Path to the Steinberg VST SDK")
SET(VSTSDK_INCLUDE_DIR ${VSTSDK_PATH})
SET(VSTSDK_PLUGIN_SOURCE
    ${VSTSDK_PATH}/public.sdk/source/vst2.x/audioeffectx.cpp
    ${VSTSDK_PATH}/public.sdk/source/vst2.x/audioeffect.cpp
    ${VSTSDK_PATH}/public.sdk/source/vst2.x/vstplugmain.cpp
)

SET(VSTSDK_HOST_SOURCE
    ${VSTSDK_PATH}/pluginterfaces/vst2.x/aeffectx.cpp
)

#-------------------------------------------------------------------------------
# Set what to compile how
#-------------------------------------------------------------------------------
SET(GIJZELIJZER_SOURCE
    src/gijzelijzer.cpp
    src/gijzelijzer.h
    src/gijzelijzermain.cpp
    resources/gijzelijzer.rc
    resources/vstplug.def
    ${VSTSDK_PLUGIN_SOURCE}
)

ADD_LIBRARY(gijzelijzer SHARED ${GIJZELIJZER_SOURCE})

#-------------------------------------------------------------------------------
# Include 3rd party library headers
#-------------------------------------------------------------------------------
INCLUDE_DIRECTORIES(
    ${VSTSDK_INCLUDE_DIR}
)

#-------------------------------------------------------------------------------
# Link libraries
#-------------------------------------------------------------------------------
TARGET_LINK_LIBRARIES(gijzelijzer
    ${VSTSDK_LIBRARIES}
)

0 个答案:

没有答案