"Daniel E. Moctezuma" <dmoctez...@kmess.org> writes:

> if( KROSSPYTHON_LIBRARY )
>   set( KROSSPYTHON_FOUND TRUE )
> else( KROSSPYTHON_LIBRARY )
>   find_library( KROSSPYTHON_LIBRARY
>                 NAMES krosspython
>                 PATHS ${KDE4_LIB_DIR}
>                              ${LIB_INSTALL_DIR} )
>
>   include( FindPackageHandleStandardArgs )
>   find_package_handle_standard_args( KrossPython DEFAULT_MSG
> KROSSPYTHON_LIBRARY )
> endif( KROSSPYTHON_LIBRARY )
>
> mark_as_advanced( KROSSPYTHON_LIBRARY )

A few CMake tips:
 * The if() block is not needed, as find_package_handle_standard_args is
   responsible for setting KrossPython_FOUND if KROSSPYTHON_LIBRARY has
   been found (pay attention to the capitalization).

 * You should not need to pass additional PATHS to find_library(),
   however you might need to pass "kde4" to PATH_SUFFIXES (in fact,
   hardcoding "kde4" is not the best solution; if there's not
   appropriate variable, you could ping us in the kde-buildsystem
   mailing list).

 * After that, you should check your CMAKE_PREFIX_PATH and see if
   contains the directory which has krosspython.so.

Now find_library is probably not finding krosspython because it does not
start with the 'lib' prefix (ie it's not libkrosspython.so) -- try
appending ".${CMAKE_SHARED_LIBRARY_SUFFIX}", as in:

    find_library(FOO_LIBRARY
                 NAMES "krosspython${CMAKE_SHARED_LIBRARY_SUFFIX}")
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

Reply via email to