I'm trying
to resolve bug report 1040 with respect to amarok not building
with cmake.
Under normal conditions, the build always fails with the following:
/dev/shm/amarok/amarok/src/amarokcore/amarokdcophandler.cpp:914: error:
'ScriptManager' has not been declared
/dev/shm/amarok/amarok/src/amarokcore/amarokdcophandler.cpp:919: error:
'ScriptManager' has not been declared
/dev/shm/amarok/amarok/src/amarokcore/amarokdcophandler.cpp:924: error:
'ScriptManager' has not been declared
> I concluded that amarokdcophandler.cpp was not finding scriptmanager.h,
> which is in the parent directory.
>
> As a test, I copied scriptmanager.h to the same directory as
> amarokdcophandler.cpp. The build failures disappeared and the package
> built.
Try to add ${CMAKE_CURRENT_SOURCE_DIR}/.. to include_directories()
No success. :(
I tried all of the following:
${CMAKE_CURRENT_SOURCE_DIR}/..
..
${CMAKE_BINARY_DIR}/amarok/src
${CMAKE_SOURCE_DIR}/amarok/src
${CMAKE_BINARY_DIR}/amarok/src/amarokcore/..
${CMAKE_SOURCE_DIR}/amarok/src/amarokcore/..
The only thing that works is copying scriptmanager.h to the same directory or reversing
commit 477d071b.
Commit 477d071b:
diff --git a/cmake/modules/FindTQt.cmake b/cmake/modules/FindTQt.cmake
index bf2ca8a..889a84c 100644
--- a/cmake/modules/FindTQt.cmake
+++ b/cmake/modules/FindTQt.cmake
@@ -86,6 +86,6 @@ tde_restore( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES )
# TQT_CXX_FLAGS
-foreach( _flag ${TQT_CFLAGS_OTHER} )
+foreach( _flag ${TQT_CFLAGS} ${TQT_CFLAGS_OTHER} )
set( TQT_CXX_FLAGS "${TQT_CXX_FLAGS} ${_flag}" )
endforeach()
Maybe the cure is somewhere else?
Darrell