]> git.seodisparate.com - MeterForPulseAudio/commitdiff
Init commit with skeleton project
authorStephen Seo <seo.disparate@gmail.com>
Sat, 16 Jun 2018 10:40:10 +0000 (19:40 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Sat, 16 Jun 2018 10:40:10 +0000 (19:40 +0900)
.gitignore [new file with mode: 0644]
.gitmodules [new file with mode: 0644]
AnotherDangParser [new submodule]
CMakeLists.txt [new file with mode: 0644]
src/Main.cpp [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..19cc2c4
--- /dev/null
@@ -0,0 +1,2 @@
+build*/
+compile_commands.json
diff --git a/.gitmodules b/.gitmodules
new file mode 100644 (file)
index 0000000..0e55935
--- /dev/null
@@ -0,0 +1,3 @@
+[submodule "AnotherDangParser"]
+       path = AnotherDangParser
+       url = https://github.com/Stephen-Seo/AnotherDangParser.git
diff --git a/AnotherDangParser b/AnotherDangParser
new file mode 160000 (submodule)
index 0000000..c3dad62
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit c3dad6273a6b80cb35174e3bd217ee92fd762c07
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644 (file)
index 0000000..8fdc328
--- /dev/null
@@ -0,0 +1,49 @@
+cmake_minimum_required(VERSION 3.0)
+
+project(MeterForPulseAudio VERSION 1.0)
+
+set(MeterForPulseAudio_SOURCES
+    src/Main.cpp
+)
+
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic")
+set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
+set(CMAKE_CXX_FLAGS_RELEASE "-O3 -D NDEBUG")
+
+if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
+    message(STATUS "Setting build type to 'Debug', none was specified.")
+    set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE)
+    set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release")
+endif()
+
+add_executable(MeterForPulseAudio ${MeterForPulseAudio_SOURCES})
+
+if(APPEND_VERSION_TO_EXECUTABLE)
+    set_target_properties(MeterForPulseAudio
+        PROPERTIES
+        VERSION ${MeterForPulseAudio_VERSION}
+    )
+endif()
+
+target_compile_features(MeterForPulseAudio PUBLIC cxx_std_14)
+
+find_package(PulseAudio 11 REQUIRED)
+message(STATUS "Found PulseAudio ${PulseAudio_VERSION}")
+
+target_include_directories(MeterForPulseAudio PUBLIC ${PULSEAUDIO_INCLUDE_DIR})
+target_link_libraries(MeterForPulseAudio PUBLIC ${PULSEAUDIO_LIBRARY})
+
+# add sub-project AnotherDangParser
+if(NOT EXISTS "${CMAKE_SOURCE_DIR}/AnotherDangParser/src")
+    message(FATAL_ERROR "AnotherDangParser submodule not loaded! Please run "
+        "'git submodule update --init --recursive'!")
+endif()
+add_subdirectory(AnotherDangParser)
+target_include_directories(MeterForPulseAudio PUBLIC AnotherDangParser/src)
+target_link_libraries(MeterForPulseAudio PUBLIC AnotherDangParser)
+
+install(TARGETS MeterForPulseAudio
+    RUNTIME DESTINATION bin
+    ARCHIVE DESTINATION lib
+    LIBRARY DESTINATION lib
+)
diff --git a/src/Main.cpp b/src/Main.cpp
new file mode 100644 (file)
index 0000000..5549c30
--- /dev/null
@@ -0,0 +1,5 @@
+
+int main(int argc, char** argv)
+{
+    return 0;
+}