Change: Switch from waf to CMake
parent
adebff98b0
commit
6cfd64615d
|
@ -0,0 +1,26 @@
|
||||||
|
cmake_minimum_required(VERSION 3.25)
|
||||||
|
|
||||||
|
PROJECT(mloop)
|
||||||
|
|
||||||
|
INCLUDE(${CMAKE_ROOT}/Modules/FindPkgConfig.cmake)
|
||||||
|
|
||||||
|
pkg_check_modules(JACK jack)
|
||||||
|
pkg_check_modules(NCURSES ncurses)
|
||||||
|
|
||||||
|
ADD_DEFINITIONS(-Wall -g)
|
||||||
|
|
||||||
|
SET(SOURCES
|
||||||
|
src/jack.cpp
|
||||||
|
src/jack.h
|
||||||
|
src/loop.cpp
|
||||||
|
src/loop.h
|
||||||
|
src/mloop.cpp
|
||||||
|
src/notecache.cpp
|
||||||
|
src/notecache.h
|
||||||
|
src/ringbuffer.cpp
|
||||||
|
src/ringbuffer.h
|
||||||
|
src/ui.cpp
|
||||||
|
src/ui.h)
|
||||||
|
|
||||||
|
ADD_EXECUTABLE(mloop ${SOURCES})
|
||||||
|
TARGET_LINK_LIBRARIES(mloop ${JACK_LIBRARIES} ${NCURSES_LIBRARIES})
|
13
src/wscript
13
src/wscript
|
@ -1,13 +0,0 @@
|
||||||
#! /usr/bin/env python
|
|
||||||
# encoding: utf-8
|
|
||||||
|
|
||||||
def configure(conf):
|
|
||||||
conf.check_cfg(package='jack', uselib_store='JACK', args='--cflags --libs', atleast_version='0.116.2')
|
|
||||||
conf.env['LIB_NCURSES'] = ['ncurses']
|
|
||||||
|
|
||||||
def build(bld):
|
|
||||||
bld.new_task_gen(
|
|
||||||
features = 'cxx cprogram',
|
|
||||||
source = 'jack.cpp loop.cpp mloop.cpp notecache.cpp ringbuffer.cpp ui.cpp',
|
|
||||||
target = 'mloop',
|
|
||||||
uselib = 'JACK NCURSES')
|
|
30
wscript
30
wscript
|
@ -1,30 +0,0 @@
|
||||||
#! /usr/bin/env python
|
|
||||||
# encoding: utf-8
|
|
||||||
|
|
||||||
VERSION='0.0.1'
|
|
||||||
APPNAME='mloop'
|
|
||||||
|
|
||||||
srcdir = '.'
|
|
||||||
blddir = 'build'
|
|
||||||
|
|
||||||
def init():
|
|
||||||
pass
|
|
||||||
|
|
||||||
def set_options(opt):
|
|
||||||
opt.tool_options('compiler_cxx')
|
|
||||||
|
|
||||||
def configure(conf):
|
|
||||||
conf.check_tool('compiler_cxx')
|
|
||||||
conf.sub_config('src')
|
|
||||||
|
|
||||||
env = conf.env.copy()
|
|
||||||
env.set_variant('debug')
|
|
||||||
conf.set_env_name('debug', env)
|
|
||||||
conf.setenv('debug')
|
|
||||||
conf.env.CXXFLAGS = ['-Wall', '-g']
|
|
||||||
|
|
||||||
def build(bld):
|
|
||||||
bld.add_subdirs('src')
|
|
||||||
|
|
||||||
for obj in bld.all_task_gen[:]:
|
|
||||||
new_obj = obj.clone('debug')
|
|
Loading…
Reference in New Issue