Last active
June 2, 2016 04:08
-
-
Save gocha/3d63d4c22074dba01d5e5f7cf54f772d to your computer and use it in GitHub Desktop.
Minimal CMakeLists.txt for craigsapp's midifile library
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 2.8) | |
project(midifile CXX) | |
set(CMAKE_CXX_STANDARD 11) | |
set(CMAKE_CXX_STANDARD_REQUIRED ON) | |
set(VERSION "0.0.0") | |
include_directories(include) | |
if(MSVC) | |
option(STATIC_CRT "Use static CRT libraries" OFF) | |
# Rewrite command line flags to use /MT if necessary | |
if(STATIC_CRT) | |
foreach(flag_var | |
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE | |
CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO) | |
if(${flag_var} MATCHES "/MD") | |
string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") | |
endif(${flag_var} MATCHES "/MD") | |
endforeach(flag_var) | |
endif() | |
endif() | |
#============================================================================ | |
# midifile | |
#============================================================================ | |
set(MIDIFILE_PUBLIC_HDRS | |
#include/Options.h | |
include/Binasc.h | |
include/MidiEvent.h | |
include/MidiEventList.h | |
include/MidiFile.h | |
include/MidiMessage.h | |
) | |
set(MIDIFILE_PRIVATE_HDRS | |
) | |
set(MIDIFILE_SRCS | |
src-library/Binasc.cpp | |
src-library/MidiEvent.cpp | |
src-library/MidiEventList.cpp | |
src-library/MidiFile.cpp | |
src-library/MidiMessage.cpp | |
#src-library/Options.cpp | |
) | |
add_library(midifile STATIC ${MIDIFILE_SRCS} ${MIDIFILE_PUBLIC_HDRS} ${MIDIFILE_PRIVATE_HDRS}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment