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

jreen 1.1.1 broken against qt-4.8.5 with cmake 2.8.12.2 #24

Open
ghost opened this issue Apr 29, 2014 · 4 comments
Open

jreen 1.1.1 broken against qt-4.8.5 with cmake 2.8.12.2 #24

ghost opened this issue Apr 29, 2014 · 4 comments

Comments

@ghost
Copy link

ghost commented Apr 29, 2014

Err
Looks like you guys use an internal macro that has been changed..
any chance of releasing a patch for this or a version bump soon?

thanks!

http://public.kitware.com/pipermail/cmake-developers/2013-October/008863.html

-- Looking for Q_WS_MAC - not found
-- Found Qt4: /usr/bin/qmake (found suitable version "4.8.5", minimum required is "4.6.0") 
-- Found PkgConfig: /usr/bin/x86_64-pc-linux-gnu-pkg-config (found version "0.28") 
-- checking for one of the modules 'libgsasl'
-- Could NOT find libidn
-- checking for one of the modules 'speex'
-- Speex library is found.
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.8") 
CMake Error at cmake/jreenMacros.cmake:60 (QT4_CREATE_MOC_COMMAND):
  QT4_CREATE_MOC_COMMAND Macro invoked with incorrect arguments for macro
  named: QT4_CREATE_MOC_COMMAND
Call Stack (most recent call first):
  CMakeLists.txt:133 (JREEN_WRAP_CPP)
@ghost ghost changed the title jreen 1.1.1 broken against qt-4.8.5 jreen 1.1.1 broken against qt-4.8.5 with cmake 2.8.12.2 Apr 29, 2014
@xhochy
Copy link
Contributor

xhochy commented Apr 29, 2014

The file causing the problems was already removed in 3b99e1b#diff-272ceadb8458515b2ae4b5630a6029cc

@ghost
Copy link
Author

ghost commented Apr 29, 2014

Thanks, @xhochy I'm aware its been removed, i'm requesting a bump to fix this issue for distros.. in any case, I've filed this patch downstream... other distros will need to do the same if they want to use jreen at all

--- jreen-1.1.1/cmake/jreenMacros.cmake 2013-01-06 10:49:31.000000000 -0500
+++ jreenMacros.cmake   2014-04-29 00:29:30.176468877 -0400
@@ -39,16 +39,26 @@
                                 FOREACH (_current_MOC_INC ${_match})
                                         STRING(REGEX MATCH "moc_[^ <\"]+\\.cpp" _current_MOC "${_current_MOC_INC}")
                                         SET(_moc    ${CMAKE_CURRENT_BINARY_DIR}/${_current_MOC})
-                                        QT4_CREATE_MOC_COMMAND(${_abs_FILE} ${_moc} "${_moc_INCS}" "")
-                                        MACRO_ADD_FILE_DEPENDENCIES(${_abs_FILE} ${_moc})
+                                       #QT4_CREATE_MOC_COMMAND(${_abs_FILE} ${_moc} "${_moc_INCS}" "")
+                                       IF (CMAKE_VERSION VERSION_GREATER 2.8.11.20130607)
+                                               QT4_CREATE_MOC_COMMAND(${_abs_FILE} ${_moc} "${_moc_INCS}" "" "")
+                                       ELSE(CMAKE_VERSION VERSION_GREATER 2.8.11.20130607)
+                                               QT4_CREATE_MOC_COMMAND(${_abs_FILE} ${_moc} "${_moc_INCS}" "")
+                                       ENDIF(CMAKE_VERSION VERSION_GREATER 2.8.11.20130607)
+                                       MACRO_ADD_FILE_DEPENDENCIES(${_abs_FILE} ${_moc})
                                 ENDFOREACH (_current_MOC_INC)
                         ENDIF()
                         IF(_match2)
                                 FOREACH (_current_MOC_INC ${_match2})
                                         STRING(REGEX MATCH "[^ <\"]+\\.moc" _current_MOC "${_current_MOC_INC}")
                                         SET(_moc    ${CMAKE_CURRENT_BINARY_DIR}/${_current_MOC})
-                                        QT4_CREATE_MOC_COMMAND(${_header} ${_moc} "${_moc_INCS}" "")
-                                        MACRO_ADD_FILE_DEPENDENCIES(${_header} ${_moc})
+                                       #QT4_CREATE_MOC_COMMAND(${_header} ${_moc} "${_moc_INCS}" "")
+                                       IF (CMAKE_VERSION VERSION_GREATER 2.8.11.20130607)
+                                               QT4_CREATE_MOC_COMMAND(${_header} ${_moc} "${_moc_INCS}" "" "")
+                                       ELSE(CMAKE_VERSION VERSION_GREATER 2.8.11.20130607)
+                                               QT4_CREATE_MOC_COMMAND(${_header} ${_moc} "${_moc_INCS}" "")
+                                       ENDIF(CMAKE_VERSION VERSION_GREATER 2.8.11.20130607)
+                                       MACRO_ADD_FILE_DEPENDENCIES(${_header} ${_moc})
                                 ENDFOREACH (_current_MOC_INC)
                         ENDIF()
                 ENDIF()
@@ -57,7 +67,12 @@
                         STRING(REGEX MATCHALL "Q_OBJECT|Q_GADGET" _match2 "${_contents}")
                         IF(_match2)
                                 QT4_MAKE_OUTPUT_FILE(${_abs_FILE} moc_ cpp outfile)
-                                QT4_CREATE_MOC_COMMAND(${_abs_FILE} ${outfile} "${moc_flags}" "${moc_options}")
+                               #QT4_CREATE_MOC_COMMAND(${_abs_FILE} ${outfile} "${moc_flags}" "${moc_options}")
+                               IF (CMAKE_VERSION VERSION_GREATER 2.8.11.20130607)
+                                       QT4_CREATE_MOC_COMMAND(${_abs_FILE} ${outfile} "${moc_flags}" "${moc_options}" "")
+                               ELSE(CMAKE_VERSION VERSION_GREATER 2.8.11.20130607)
+                                       QT4_CREATE_MOC_COMMAND(${_abs_FILE} ${output} "${moc_flags}" "${moc_options}")
+                               ENDIF(CMAKE_VERSION VERSION_GREATER 2.8.11.20130607)
                                 SET(${outfiles} ${${outfiles}} ${outfile})
                         ENDIF()
                 ENDIF()

@euroelessar
Copy link
Owner

I've released 1.2.0, does this issue is still actual?

@xhochy
Copy link
Contributor

xhochy commented May 13, 2014

Fixed as JreenMacros is non-existstent now

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