mirror of
https://github.com/fmang/opustags.git
synced 2024-11-05 21:17:22 +01:00
build the project with cmake
This commit is contained in:
parent
241c9b3071
commit
65aad6f62a
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,2 +1 @@
|
||||
/opustags
|
||||
/opustags.1.gz
|
||||
/build
|
||||
|
23
CMakeLists.txt
Normal file
23
CMakeLists.txt
Normal file
@ -0,0 +1,23 @@
|
||||
cmake_minimum_required(VERSION 3.9)
|
||||
|
||||
project(
|
||||
opustags
|
||||
VERSION 1.2.0
|
||||
LANGUAGES CXX
|
||||
)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
include(FindPkgConfig)
|
||||
pkg_check_modules(OGG REQUIRED ogg)
|
||||
|
||||
add_executable(opustags opustags.cc)
|
||||
target_compile_options(opustags PUBLIC ${OGG_CFLAGS})
|
||||
target_link_libraries(opustags PUBLIC ${OGG_LIBRARIES})
|
||||
|
||||
include(GNUInstallDirs)
|
||||
install(TARGETS opustags DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
||||
install(FILES opustags.1 DESTINATION "${CMAKE_INSTALL_MANDIR}/man1")
|
||||
|
||||
add_custom_target(check COMMAND prove "${CMAKE_SOURCE_DIR}/t")
|
28
Makefile
28
Makefile
@ -1,28 +0,0 @@
|
||||
DESTDIR=/usr/local
|
||||
MANDEST=share/man
|
||||
CXXFLAGS=-Wall -std=c++14
|
||||
LDFLAGS=-logg
|
||||
|
||||
all: opustags
|
||||
|
||||
opustags: opustags.cc
|
||||
|
||||
man: opustags.1
|
||||
gzip <opustags.1 >opustags.1.gz
|
||||
|
||||
install: opustags man
|
||||
mkdir -p $(DESTDIR)/bin $(DESTDIR)/$(MANDEST)/man1
|
||||
install -m 755 opustags $(DESTDIR)/bin/
|
||||
install -m 644 opustags.1.gz $(DESTDIR)/$(MANDEST)/man1/
|
||||
|
||||
uninstall:
|
||||
rm -f $(DESTDIR)/bin/opustags
|
||||
rm -f $(DESTDIR)/$(MANDEST)/man1/opustags.1.gz
|
||||
|
||||
clean:
|
||||
rm -f opustags opustags.1.gz
|
||||
|
||||
check: opustags
|
||||
prove
|
||||
|
||||
.PHONY: all man install uninstall clean check
|
12
README.md
12
README.md
@ -27,14 +27,24 @@ Requirements
|
||||
------------
|
||||
|
||||
* a C++14 compiler,
|
||||
* CMake,
|
||||
* a POSIX-compliant system,
|
||||
* libogg.
|
||||
|
||||
Installing
|
||||
----------
|
||||
|
||||
opustags is a commonplace CMake project.
|
||||
|
||||
Here's how to install it in your .local, under your home:
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_INSTALL_PREFIX=~/.local ..
|
||||
make
|
||||
make DESTDIR=/usr/local install
|
||||
make install
|
||||
|
||||
Note that you don't need to install opustags in order to run it, as the executable is standalone.
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
Loading…
Reference in New Issue
Block a user