Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue building libopenshot with JuceHeader.h #1

Closed
hadim opened this issue Jun 16, 2015 · 6 comments
Closed

Issue building libopenshot with JuceHeader.h #1

hadim opened this issue Jun 16, 2015 · 6 comments

Comments

@hadim
Copy link

hadim commented Jun 16, 2015

I installed libopenshot-audio in a custom directory (let's say /home/user/local). When I now try to install libopenshot, CMake correctly find libopenshot-audio. However when building the lib with make, I have an error:

$ cmake -DCMAKE_INSTALL_PREFIX=/home/user/local -DLIBOPENSHOT_AUDIO_BASE_DIR=/home/user/local ..

...
-- Found LIBOPENSHOT_AUDIO: /home/user/local/lib/libopenshot-audio.so  
'LIBOPENSHOT_AUDIO_INCLUDE_DIRS:/home/user/local'
...

And

$ make
[  1%] Generating __/include/Qt/moc_VideoRenderer.cpp
[  2%] Generating __/include/Qt/moc_AudioPlaybackThread.cpp
/opt/local/openshot/libopenshot/include/Qt/AudioPlaybackThread.h:0: Note: No relevant classes found. No output generated.
[  3%] Generating __/include/Qt/moc_VideoCacheThread.cpp
/opt/local/openshot/libopenshot/include/Qt/VideoCacheThread.h:0: Note: No relevant classes found. No output generated.
[  5%] Generating __/include/Qt/moc_PlayerDemo.cpp
[  6%] Generating __/include/Qt/moc_PlayerPrivate.cpp
/opt/local/openshot/libopenshot/include/Qt/PlayerPrivate.h:0: Note: No relevant classes found. No output generated.
[  7%] Generating __/include/Qt/moc_VideoRenderWidget.cpp
[  9%] Generating __/include/Qt/moc_VideoPlaybackThread.cpp
/opt/local/openshot/libopenshot/include/Qt/VideoPlaybackThread.h:0: Note: No relevant classes found. No output generated.
Scanning dependencies of target openshot
[ 10%] Building CXX object src/CMakeFiles/openshot.dir/AudioBufferSource.cpp.o
In file included from /opt/local/openshot/libopenshot/src/AudioBufferSource.cpp:28:0:
/opt/local/openshot/libopenshot/src/../include/AudioBufferSource.h:40:40: fatal error: JuceLibraryCode/JuceHeader.h: No such file or directory
 #include "JuceLibraryCode/JuceHeader.h"
                                        ^
compilation terminated.
make[2]: *** [src/CMakeFiles/openshot.dir/AudioBufferSource.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/openshot.dir/all] Error 2
make: *** [all] Error 2

I have the feeling that the issue comes from here https://github.com/OpenShot/libopenshot/blob/master/cmake/Modules/FindOpenShotAudio.cmake#L46 ...

Any idea ?

@hadim
Copy link
Author

hadim commented Jun 16, 2015

It seems that include/libopenshot-audio/ is not correctly included in the build system.

@hadim
Copy link
Author

hadim commented Jun 16, 2015

Note that when I add include_directories("/home/user/localinclude/libopenshot-audio") to https://github.com/OpenShot/libopenshot/blob/master/CMakeLists.txt#L64, the build is a success.

@hadim
Copy link
Author

hadim commented Jun 16, 2015

The following patch fix the issue:

$ git diff
diff --git a/cmake/Modules/FindOpenShotAudio.cmake b/cmake/Modules/FindOpenShotAudio.cmake
index 720b93a..329a0b0 100644
--- a/cmake/Modules/FindOpenShotAudio.cmake
+++ b/cmake/Modules/FindOpenShotAudio.cmake
@@ -24,7 +24,7 @@ FOREACH(HEADER_PATH ${JUCE_HEADER_FILES})
        get_filename_component(HEADER_DIRECTORY ${HEADER_PATH}
                PATH
        )
-       
+
        # Append each directory into the HEADER_DIRECTORIES list
        LIST(APPEND HEADER_DIRECTORIES ${HEADER_DIRECTORY})
 ENDFOREACH(HEADER_PATH)
@@ -45,7 +45,7 @@ set(LIBOPENSHOT_AUDIO_LIBRARY ${LIBOPENSHOT_AUDIO_LIBRARIES})

 # Seems to work fine with just the base dir (rather than all the actual include folders)
 set(LIBOPENSHOT_AUDIO_INCLUDE_DIR ${LIBOPENSHOT_AUDIO_BASE_DIR} )
-set(LIBOPENSHOT_AUDIO_INCLUDE_DIRS ${LIBOPENSHOT_AUDIO_BASE_DIR} )
+set(LIBOPENSHOT_AUDIO_INCLUDE_DIRS "${LIBOPENSHOT_AUDIO_BASE_DIR}/include/libopenshot-audio" )

 include(FindPackageHandleStandardArgs)
 # handle the QUIETLY and REQUIRED arguments and set LIBOPENSHOT_AUDIO_FOUND to TRUE

@hadim
Copy link
Author

hadim commented Jan 12, 2016

Any news here ? (@jonoomph )

@hadim
Copy link
Author

hadim commented Jan 12, 2016

Want me to open a PR ?

@ferdnyc
Copy link
Contributor

ferdnyc commented Oct 26, 2019

This (our oldest open issue here) is long since fixed somewhere along the way, and should be improved further in the coming weeks with the introduction of EXPORT targets from libopenshot-audio. Closing, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants