-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Labels
Description
Hi, not really a feature request, just putting this here in case people want this.
After "installing" (https://github.com/cpm-cmake/CPM.cmake) the CPM.cmake file into your project:
include(cmake/CPM.cmake)
CPMAddPackage(
NAME finalcut
GIT_REPOSITORY https://github.com/gansm/finalcut.git
GIT_TAG 0.9.1
DOWNLOAD_ONLY YES
)
if (finalcut_ADDED)
# finalcut has no CMake support, so we create our own target
# needs libgpm-dev libncurses-dev
include(FindPkgConfig)
# pkg_check_modules(gpm gpm IMPORTED_TARGET) # looks like gpm does not have a .pc file on ubuntu
pkg_check_modules(ncurses ncurses IMPORTED_TARGET)
FILE(GLOB_RECURSE finalcut_sources ${finalcut_SOURCE_DIR}/final/*.cpp)
add_library(finalcut STATIC ${finalcut_sources})
target_link_libraries(finalcut
# PkgConfig::gpm
gpm
PkgConfig::ncurses
)
target_include_directories(finalcut
PUBLIC
$<BUILD_INTERFACE:${finalcut_SOURCE_DIR}>
)
target_compile_definitions(finalcut PUBLIC COMPILE_FINAL_CUT F_HAVE_LIBGPM=1)
endif()You can then simply use finalcut target to link to your executables.
deccer, gansm and dskprt