Skip to content
This repository has been archived by the owner on Dec 11, 2022. It is now read-only.

Feature/add conan #5

Open
wants to merge 147 commits into
base: v1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
147 commits
Select commit Hold shift + click to select a range
6ca20b5
Merge remote-tracking branch 'upstream/v1-gpl' into v1-gpl
qno May 11, 2019
3cdb6f4
added initial conanfile.txt
qno May 5, 2019
2b62f71
added initial CMakeLists.txt
qno May 5, 2019
77a5e04
added initial azure-pipelines definition
qno May 5, 2019
d75cfd0
fixed errors
qno May 5, 2019
33f7487
renamed Mac CI job to MacOS1014
qno May 5, 2019
7c25ad1
removed Ninja generator from MacOS CI job
qno May 5, 2019
2eee6e8
added comment on pipeline definition
qno May 5, 2019
cffcb00
added build=missing to MacOS CI job
qno May 5, 2019
b5143b3
fixed CMake target_compile_definitions for Mac build
qno May 5, 2019
313d514
removed glfwGetOpenedFilename
qno May 6, 2019
701ef4e
extended comment about glfwGetOpenedFilename removal
qno May 6, 2019
7eaa1a5
build CI jobs in Release mode
qno May 6, 2019
5afb88a
set MacOS LINK_FLAG to export_dynamic
qno May 7, 2019
c50f64a
added FLAGS MAC_OS_VERSION_MIN and -undefined dynamic_lookup for MacOS
qno May 7, 2019
f96c800
build CI jobs with VERBOSE make
qno May 7, 2019
6534e2a
fixed MacOS build
qno May 7, 2019
36fce1f
try fix MacOS CI error with XCode version 10.0
qno May 7, 2019
69f43a6
try for now to stick on OSX 10.9 as minimum
qno May 7, 2019
7a45fd1
try fix CMake
qno May 7, 2019
2975fa2
added MinGW CI build job
qno May 7, 2019
f9998f3
create conan profile for MinGW
qno May 7, 2019
1da0c7d
add conan profile definition for MinGW
qno May 7, 2019
5a23175
use dedicated mingw profile for MinGW build job
qno May 7, 2019
0184b28
create missing profiles folder for MinGW job
qno May 7, 2019
6fdf4ca
use MinGW profile from path
qno May 7, 2019
e24132b
update jansson dependency to 2.12
qno May 8, 2019
341fd82
added MinGW build definition
qno May 9, 2019
51b66fa
switched to GCC 8.2 compiler
qno May 9, 2019
dd4ea8d
added Linux Clang build job to CI
qno May 9, 2019
280c2cc
moved conan profiles into .ci folder
qno May 9, 2019
629cc77
switched MinGW GCC back to version 8.1
qno May 9, 2019
0af0d8e
switch from official glfw to VCVRack fork of glfw
qno May 9, 2019
d8233f5
run Linux build jobs with docker container
qno May 11, 2019
9c3c775
added stb dependency
qno May 11, 2019
9f05d79
set mingw gcc to version 8
qno May 12, 2019
b785bf0
use renamed mingw profile
qno May 12, 2019
c286272
fixed comment
qno May 12, 2019
508fe2b
update stb dependency
qno May 12, 2019
7c26384
Merge remote-tracking branch 'upstream/v1-gpl' into v1-gpl
qno May 12, 2019
e3a9d4e
Merge branch 'v1-gpl' into feature/add_conan
qno May 12, 2019
13357fe
added .gitattributes
qno May 13, 2019
74bd9ea
cleanup
qno May 14, 2019
ab4a11b
build MinGW job with libstdc++
qno May 14, 2019
5db9b3f
Merge remote-tracking branch 'upstream/v1-gpl' into v1-gpl
qno May 14, 2019
8779350
Merge branch 'v1-gpl' into feature/add_conan
qno May 14, 2019
03f65a1
disable Visual Studio build
qno May 14, 2019
3c1424c
activate conan virtualenv for MinGW build
qno May 14, 2019
e126a36
fix MinGW linker error
qno May 15, 2019
dd7950b
cleanup
qno May 15, 2019
4c20dfe
removed .gitattributes
qno May 20, 2019
c14fc05
Merge branch 'v1' into feature/add_conan
qno May 20, 2019
c933d9c
enable exporting symbols for Windows builds
qno May 20, 2019
01e57ef
correct exporting of symbols for MinGW
qno May 21, 2019
3d4d34c
collect c/cpp and h/hpp for header and source files
qno May 21, 2019
a3bce29
Merge branch 'v1' into feature/add_conan
qno May 21, 2019
58f908d
Merge branch 'v1' into feature/add_conan
qno Jun 3, 2019
b5928d4
Merge branch 'v1' into feature/add_conan
qno Jun 4, 2019
fc9627f
moved compiler flag -Wsuggest-override from AppleClang to Clang and Gcc
qno Jun 4, 2019
fe6106e
use OUIBlendish VCVRack fork dependency
qno Jun 4, 2019
a6f5729
replaced conanfile.txt with conanfile.py recipe
qno Jun 5, 2019
cb9a08c
Merge branch 'v1' into feature/add_conan
qno Jun 5, 2019
c24c8d4
added Rack.rc resource for MinGW build
qno Jun 10, 2019
3673a64
Merge branch 'v1' into feature/add_conan
qno Jun 10, 2019
776d7ec
Merge branch 'v1' into feature/add_conan
qno Jun 13, 2019
6b901e4
added nasm dependency
qno Jun 16, 2019
928354a
added copying required resources to bin directory
qno Jun 16, 2019
4f493f4
added add_binary macro
qno Jun 16, 2019
52bb3a3
Merge branch 'v1' into feature/add_conan
qno Jun 16, 2019
86c734a
cleanup, added documentation
qno Jun 17, 2019
6cbe487
Merge branch 'v1' into feature/add_conan
qno Jun 17, 2019
b94c0fa
Merge branch 'v1' into feature/add_conan
qno Jun 18, 2019
0f726ff
publish VCVRackSDK Linux build to bintray
qno Jun 18, 2019
5992b65
added CI status badges
qno Jun 18, 2019
b45d99e
fix VCVRackSDK script
qno Jun 18, 2019
80f8a2c
fix conan upload problem
qno Jun 18, 2019
be54e70
fix badges layout
qno Jun 18, 2019
ff12351
publish VCVRackSDK Linux (Clang), MacOS and MinGW builds to bintray
qno Jun 18, 2019
ac0e51b
fix MinGW script
qno Jun 18, 2019
cb4b884
fix MacOS script
qno Jun 18, 2019
ca3a2b5
fix MinGW VCVRackSDK upload
qno Jun 18, 2019
fcd5105
corrected settings for VCVRackSDK builds
qno Jun 18, 2019
80c098e
fix typo in .gitattributes
qno Jun 18, 2019
25a6937
update status badges
qno Jun 19, 2019
8e75701
updated dependencies
qno Jun 19, 2019
be362f3
update CI settings
qno Jun 19, 2019
2138417
fix upload problems
qno Jun 19, 2019
e533e55
Merge branch 'v1' into feature/add_conan
qno Jun 19, 2019
0763839
remove unused LINK_FLAGS for AppleClang
qno Jun 20, 2019
a19ad9b
simplified CI definition
qno Jun 20, 2019
6904dea
cleanup package_info
qno Jun 22, 2019
6c7412d
Merge branch 'v1' into feature/add_conan
qno Jun 22, 2019
a9ff5c6
cleanup
qno Jun 23, 2019
545e398
create build artifacts and upload as assets to Github release
qno Jun 24, 2019
1a8135b
Merge branch 'v1' into feature/add_conan
qno Jun 24, 2019
a431fbd
fix artifact path
qno Jun 24, 2019
adf56e5
fix artifact copy cmd
qno Jun 24, 2019
6b54895
Merge branch 'v1' into feature/add_conan
qno Jun 25, 2019
52f30eb
Merge branch 'v1' into feature/add_conan
qno Jun 27, 2019
cec27c3
added plugin helper script for conan cmake build variant
qno Jun 28, 2019
3e22099
renamed to plugin-helper-cmake.py
qno Jun 30, 2019
a623927
Merge branch 'v1' into feature/add_conan
qno Jun 30, 2019
8fe652e
Merge branch 'v1' into feature/add_conan
qno Jul 2, 2019
6a979fe
Fix Inkscape labels - added fix from upstream
qno Jul 2, 2019
86e20b7
Merge branch 'v1' into feature/add_conan
qno Jul 5, 2019
fb81da8
Merge branch 'v1' into feature/add_conan
qno Jul 6, 2019
624c9fd
Merge branch 'v1' into feature/add_conan
qno Jul 8, 2019
6ff28ef
Merge branch 'v1' into feature/add_conan
qno Jul 15, 2019
47ae701
added illustrator fix from upstream helper.py
qno Jul 15, 2019
86feed0
Merge branch 'v1' into feature/add_conan
qno Sep 21, 2019
77ad85c
Merge branch 'v1' into feature/add_conan
qno Sep 24, 2019
6f5f088
Merge branch 'v1' into feature/add_conan
qno Sep 25, 2019
463f0b8
renamed build stage display name
qno Sep 25, 2019
11bc57f
Merge branch 'v1' into feature/add_conan
qno Sep 25, 2019
f412ed0
Merge branch 'v1' into feature/add_conan
qno Sep 28, 2019
122b469
Merge branch 'v1' into feature/add_conan
qno Oct 5, 2019
8024b07
Merge branch 'v1' into feature/add_conan
qno Oct 15, 2019
e79e4ff
set windows platform version compatibility to Windows7
qno Oct 16, 2019
8ddeb71
moved Windows platform definition to if Windows
qno Oct 16, 2019
ede0dfa
Merge branch 'v1' into feature/add_conan
qno Oct 17, 2019
42cd069
Merge branch 'v1' into feature/add_conan
qno Oct 21, 2019
ddb66c0
update libzip, openssl dependencies
qno Oct 21, 2019
980bec9
update cmake plugin helper
qno Oct 21, 2019
487414b
update plugin helper description
qno Oct 21, 2019
71815f2
update plugin helper init message
qno Oct 21, 2019
f8d4141
Merge branch 'v1' into feature/add_conan
qno Oct 22, 2019
a389b18
for Apple enable LuaJIT
qno Oct 22, 2019
5137cbb
revert libzip to 1.5.1 because of mingw build issues with conan
qno Nov 11, 2019
107a709
Merge branch 'v1' into feature/add_conan
qno Nov 11, 2019
6084283
add libsamplerate dependency (moved from Fundamental plugin)
qno Nov 11, 2019
a14d50e
Merge branch 'v1' into feature/add_conan
qno Nov 26, 2019
8244742
correct _WIN32_WINNT setting
qno Nov 27, 2019
4846485
complement .gitignore
qno Dec 26, 2019
8dc883b
Merge branch 'v1' into feature/add_conan
qno Dec 26, 2019
d801c49
Merge branch 'v1' into feature/add_conan
qno Mar 3, 2020
7341f44
update dependencies
qno May 4, 2020
631dea0
CI - update vm images
qno May 4, 2020
22eb242
CI - fix ubuntu docker image version
qno May 4, 2020
c492562
fix CI
qno May 4, 2020
0c5cad9
CI - fix tzdata problem
qno May 4, 2020
38b665b
fix timezone setup
qno May 4, 2020
0325510
CI - cleanup
qno May 4, 2020
19e3d60
CI - remove docker based builds
qno May 4, 2020
52c6a18
CI - setup linux compilers
qno May 4, 2020
dfc4ee5
CI - linux use default available compilers
qno May 4, 2020
838a62b
CI - force linux package upload
qno May 4, 2020
75108d2
CI - set correct openssl conan package name
qno May 4, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 17 additions & 0 deletions .ci/conan_profile_mingw_gcc8
@@ -0,0 +1,17 @@
# this is a conan profile for MinGW GCC 8
[settings]
os=Windows
os_build=Windows
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=8
compiler.exception=seh
compiler.libcxx=libstdc++11
compiler.threads=posix
build_type=Release
[options]
[build_requires]
mingw_installer/1.0@conan/stable
msys2_installer/latest@bincrafters/stable
[env]
1 change: 1 addition & 0 deletions .gitattributes
@@ -0,0 +1 @@
conanfile.py text eol=lf
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -12,3 +12,5 @@
/autosave.vcv
/settings.json
/screenshots
/.idea
/cmake-*
89 changes: 89 additions & 0 deletions CMakeLists.txt
@@ -0,0 +1,89 @@
cmake_minimum_required(VERSION 3.7)

# https://cmake.org/cmake/help/latest/variable/CMAKE_OSX_DEPLOYMENT_TARGET.html
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "Minimum OS X deployment version")

project(VCVRack CXX)

set(CMAKE_CXX_STANDARD 14)

set(RACK_APP Rack)

set(RACK_GIT_REV "UNKNOWN")

find_package(Git)
if (GIT_FOUND)
execute_process(
COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
OUTPUT_VARIABLE RACK_GIT_REV
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE
)
else ()
message(WARNING "Git cmd not found")
endif ()

set(RACK_BUILD_VERSION "1.dev.${RACK_GIT_REV}")
message(STATUS "build ${RACK_APP} version '${RACK_BUILD_VERSION}'")

include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()

file(GLOB_RECURSE SOURCES src/*.cpp src/*.c)
file(GLOB_RECURSE HEADERS include/*.hpp include/*.h)

source_group("Header Files" FILES ${HEADERS})

if (MINGW)
set(SOURCES "${SOURCES}" Rack.rc)
endif ()

add_executable(${RACK_APP} ${SOURCES})

target_compile_definitions(${RACK_APP} PRIVATE VERSION=${RACK_BUILD_VERSION})

if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
# http://cmake.3232098.n2.nabble.com/Link-against-exe-on-Windows-fails-a-file-not-found-td7597550.html
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
set_target_properties(${RACK_APP} PROPERTIES ENABLE_EXPORTS ON)
target_compile_definitions(${RACK_APP} PRIVATE _USE_MATH_DEFINES ARCH_WIN _WIN32_WINNT=_WIN32_WINNT_VISTA)
endif ()

if (MINGW)
set_target_properties(${RACK_APP} PROPERTIES LINK_FLAGS "-Wl,--export-all-symbols -mwindows")
endif ()

if (MSVC)
# https://docs.microsoft.com/en-us/cpp/build/reference/compiler-options-listed-by-category?view=vs-2019
# /O2 /arch:AVX2 --> https://docs.microsoft.com/de-de/cpp/build/reference/arch-x64?view=vs-2019
target_compile_definitions(${RACK_APP} PRIVATE _CRT_SECURE_NO_WARNINGS)
else ()
set_target_properties(${RACK_APP} PROPERTIES COMPILE_FLAGS "-march=nocona -funsafe-math-optimizations")
endif ()

if (CMAKE_CXX_COMPILER_ID MATCHES "^(GNU|Clang)")
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
target_compile_definitions(${RACK_APP} PRIVATE ARCH_LIN)
set_target_properties(${RACK_APP} PROPERTIES LINK_FLAGS "-rdynamic")
endif ()
set_target_properties(${RACK_APP} PROPERTIES COMPILE_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wsuggest-override")
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
target_compile_definitions(${RACK_APP} PRIVATE ARCH_MAC)
set_target_properties(${RACK_APP} PROPERTIES LINK_FLAGS "-Wl,-pagezero_size,10000 -Wl,-image_base,100000000")
endif ()

target_include_directories(${RACK_APP} PRIVATE include)
conan_target_link_libraries(${RACK_APP})

if (MINGW)
target_link_libraries(${RACK_APP} "shlwapi" "imagehlp" "bcrypt")
endif ()

file(INSTALL Core.json template.vcv res DESTINATION bin)
if (MINGW)
get_filename_component(MINGW_PATH ${CMAKE_CXX_COMPILER} DIRECTORY)
message(STATUS "detected MinGW PATH '${MINGW_PATH}'")
file(GLOB MINGW_DLLS ${MINGW_PATH}/libgcc* ${MINGW_PATH}/libstdc++* ${MINGW_PATH}/libwinpthread*)
file(INSTALL ${MINGW_DLLS} DESTINATION bin)
endif ()
8 changes: 8 additions & 0 deletions README.md
Expand Up @@ -7,3 +7,11 @@
- [Building](https://vcvrack.com/manual/Building.html)
- [Communities](https://vcvrack.com/manual/Communities.html)
- [Licenses](LICENSE.md)

***
v1: [![Build Status](https://dev.azure.com/qnohot/qnohot/_apis/build/status/qno.Rack?branchName=v1)](https://dev.azure.com/qnohot/qnohot/_build/latest?definitionId=11&branchName=v1)

feature/add_conan: [![Build Status](https://dev.azure.com/qnohot/qnohot/_apis/build/status/qno.Rack?branchName=feature/add_conan)](https://dev.azure.com/qnohot/qnohot/_build/latest?definitionId=11&branchName=feature/add_conan)

[ ![Download](https://api.bintray.com/packages/qno/conan-public/VCVRackSDK%3Avcvrack/images/download.svg) ](https://bintray.com/qno/conan-public/VCVRackSDK%3Avcvrack/_latestVersion)
***
55 changes: 55 additions & 0 deletions add_binary.cmake
@@ -0,0 +1,55 @@
# References binary files compiled into the program.
# see - https://github.com/VCVRack/Rack/blob/bc06efd9ab14e48684f32e608b13a76ecb7367bd/include/common.hpp#L109
#
# This replaces the approach to embedd binary files with objcopy and xxd, see definition beginning at
# https://github.com/VCVRack/Rack/blob/bc06efd9ab14e48684f32e608b13a76ecb7367bd/compile.mk#L74
#
# Usage example in CMakeList.txt:
#
# include(add_binary)
# add_binary(binaryfile.bin BINARY_ASM_OUTPUT)
#
# Then add the BINARY_ASM_OUTPUT variable to the sources of the library target.
#
# This CMake macro embedds the content of a binary file into an assembler file.
#
# param in: BINARY_INPUT - path to the binary file to reference (needs an file extension, e.g. mybinary.bin)
# param out: ASM_OUTPUT - variable that holds the path to the generated assembler file
macro(ADD_BINARY BINARY_INPUT ASM_OUTPUT)

set(BINARY_INPUT_FILE ${PROJECT_SOURCE_DIR}/${BINARY_INPUT})

if (NOT EXISTS ${BINARY_INPUT_FILE})
message (FATAL_ERROR "ADD_BINARY - BINARY_INPUT file '${BINARY_INPUT_FILE}' doesn't exist")
endif ()

message (STATUS "ADD_BINARY - BINARY_INPUT: ${BINARY_INPUT_FILE}")

get_filename_component(BINARY_INPUT_EXT ${BINARY_INPUT_FILE} EXT)
get_filename_component(BINARY_INPUT_NAME_WE ${BINARY_INPUT_FILE} NAME_WE)
string(REPLACE "." "" BINARY_INPUT_EXT ${BINARY_INPUT_EXT})

message(STATUS "ADD_BINARY - BINARY_INPUT name: ${BINARY_INPUT_NAME_WE}")
message(STATUS "ADD_BINARY - BINARY_INPUT extension: ${BINARY_INPUT_EXT}")

set (ASM_GENERATED_FILE ${PROJECT_BINARY_DIR}/${BINARY_INPUT_NAME_WE}.asm)
set(${ASM_OUTPUT} ${ASM_GENERATED_FILE})
message(STATUS "ADD_BINARY - ASM_OUTPUT: ${ASM_OUTPUT}")
message(STATUS "ADD_BINARY - ASM_GENERATED_FILE: ${ASM_GENERATED_FILE}")

set (BINARY_IDENTIFIER ${BINARY_INPUT_NAME_WE}_${BINARY_INPUT_EXT})
message(STATUS "ADD_BINARY - BINARY_IDENTIFIER: ${BINARY_IDENTIFIER}")

file(GENERATE OUTPUT ${ASM_GENERATED_FILE} CONTENT
"bits 64
section .rodata

global _binary_src_${BINARY_IDENTIFIER}_start
global _binary_src_${BINARY_IDENTIFIER}_end
global _binary_src_${BINARY_IDENTIFIER}_size

_binary_src_${BINARY_IDENTIFIER}_start: incbin \"${BINARY_INPUT_FILE}\"
_binary_src_${BINARY_IDENTIFIER}_end:
_binary_src_${BINARY_IDENTIFIER}_size: dd $-_binary_src_${BINARY_IDENTIFIER}_start")

endmacro()