Skip to content

Commit

Permalink
Generate and install JuceHeader.h
Browse files Browse the repository at this point in the history
- Does nothing except `#include "./OpenShotAudio.h"`
- Linking/copying the header to both names caused redefinition
  errors if both were used in the same project.
  • Loading branch information
ferdnyc committed Apr 26, 2021
1 parent 4866455 commit 02a560f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
12 changes: 1 addition & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,7 @@ add_feature_info("JUCE path" TRUE "Using JUCE sources from: ${_juce_dir}")

# Generate our custom headers from templates
configure_file(include/OpenShotAudio.h.in include/OpenShotAudio.h @ONLY)
if(UNIX AND CMAKE_VERSION VERSION_GREATER 3.14)
# Symlink to the old header name, for backwards compatibility
file(CREATE_LINK
OpenShotAudio.h
"${CMAKE_CURRENT_BINARY_DIR}/include/JuceHeader.h"
SYMBOLIC
)
else()
# We can't symlink it, so just make a copy
configure_file(include/OpenShotAudio.h.in include/JuceHeader.h @ONLY)
endif()
configure_file(include/JuceHeader.h.in include/JuceHeader.h @ONLY)
configure_file(include/AppConfig.h.in include/AppConfig.h @ONLY)
list(APPEND _extra_headers
${CMAKE_CURRENT_BINARY_DIR}/include/OpenShotAudio.h
Expand Down
12 changes: 12 additions & 0 deletions include/JuceHeader.h.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
Legacy include file, provided for backwards-compatibility purposes
only. You should update your code to include <OpenShotAudio.h>
instead of this file.

(This comment may become a build-time warning message at some
future date.)
*/

#pragma once
#include "./OpenShotAudio.h"

0 comments on commit 02a560f

Please sign in to comment.