-
Notifications
You must be signed in to change notification settings - Fork 177
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
Cmake build: load_j2b.cpp.o: In function `Inflate': undefined reference to… #36
Comments
Looks like missing diff --git a/src/modules/Modplug/CMakeLists.txt b/src/modules/Modplug/CMakeLists.txt
index e868ee2..2d3eb3e 100644
--- a/src/modules/Modplug/CMakeLists.txt
+++ b/src/modules/Modplug/CMakeLists.txt
@@ -61,10 +61,8 @@ add_library(${PROJECT_NAME} MODULE
${Modplug_SRC}
)
-if(WIN32 OR CMAKE_SYSTEM_NAME STREQUAL "Darwin")
- find_package(ZLIB REQUIRED)
- target_link_libraries(${PROJECT_NAME} ${ZLIB_LIBRARY})
-endif()
+find_package(ZLIB REQUIRED)
+target_link_libraries(${PROJECT_NAME} ${ZLIB_LIBRARY})
if(USE_QT5)
qt5_use_modules(${PROJECT_NAME} Gui Widgets) If it will help I'll push a patch :) |
Thank you, the patch is fine but there is similar but another linking error now. |
The problem with OpenGL and ModPlug is in |
Or maybe it is better to force-remove As a workaround please apply: XVideo: diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3cd8de2..d49b97a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -142,7 +142,7 @@ option(USE_PULSEAUDIO "Build with PulseAudio module" ${LIBPULSE_FOUND})
add_feature_info(PulseAudio USE_PULSEAUDIO "Build with PulseAudio module")
if(NOT DEFINED USE_XVIDEO)
- pkg_check_modules(LIB_X11_XV x11 xv)
+ pkg_check_modules(LIB_X11_XV x11 xv xext)
endif()
option(USE_XVIDEO "Build with XVideo module" ${LIB_X11_XV_FOUND})
add_feature_info(XVideo USE_XVIDEO "Build with XVideo module")
diff --git a/src/modules/XVideo/CMakeLists.txt b/src/modules/XVideo/CMakeLists.txt
index 92c6cd7..fb8383b 100644
--- a/src/modules/XVideo/CMakeLists.txt
+++ b/src/modules/XVideo/CMakeLists.txt
@@ -28,7 +28,7 @@ set(XVideo_RESOURCES
icon.qrc
)
-pkg_check_modules(LIB_X11_XV x11 xv REQUIRED)
+pkg_check_modules(LIB_X11_XV x11 xv xext REQUIRED)
link_directories(${LIB_X11_XV_LIBRARY_DIRS})
if(USE_QT5) OpenGL2: diff --git a/src/modules/OpenGL2/CMakeLists.txt b/src/modules/OpenGL2/CMakeLists.txt
index 8464ce2..0fe2b4a 100644
--- a/src/modules/OpenGL2/CMakeLists.txt
+++ b/src/modules/OpenGL2/CMakeLists.txt
@@ -97,11 +97,13 @@ target_link_libraries(${PROJECT_NAME}
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
find_package(OpenGL REQUIRED)
target_link_libraries(${PROJECT_NAME} ${OPENGL_LIBRARIES})
-elseif(WIN32)
+else()
if(QT_USES_OPENGLES)
target_link_libraries(${PROJECT_NAME} GLESv2)
- else()
+ elseif(WIN32)
target_link_libraries(${PROJECT_NAME} opengl32)
+ else()
+ target_link_libraries(${PROJECT_NAME} GL)
endif()
endif()
|
Sorry, it's a feature of cmake packaging macro. I'll skip it.
|
Ok and I'll force-remove this flag from CMake build. |
Using the first patch and not using cmake packaging macro makes fine
build. Thank you!
|
The first patch is not necessary if you not use the |
The patch: f274748 should fix it without doing any modifications, please test it instead of doing any other modification and patches (I want to know if it works and if it doesn't break anything else) :) |
just cmake | OK | OKpackaging macro | Fail | * *: Shared objects files are put into /usr/usr/lib64 not /usr/lib64. Should |
Also 65f826c is needed if there is no additional linker flags.
Hmm... Yes. |
QMPlay2 16.07.02, openSUSE 13.2 x64, legacy build is fine.
cmake.build.log.txt
compile_unix.build.log.txt
The text was updated successfully, but these errors were encountered: