Showing with 26 additions and 27 deletions.
  1. +2 −1 cmake/travis.sh
  2. +19 −25 misc/CMakeLists.txt
  3. +2 −0 src/widgets/geticon.cpp
  4. +3 −1 src/widgets/geticon.h
3 changes: 2 additions & 1 deletion cmake/travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,9 @@ else
exc=-dw2
mingwdir=mingw32$exc
extlib=kst-3rdparty-win32-gcc$exc-4.7.2
extlib=kst-3rdparty-win32-gcc4.7
useext=
# useext="-Dkst_3rdparty=1 -Dkst_3rdparty_dir=$dep/"$extlib
useext="-Dkst_3rdparty=1 -Dkst_3rdparty_dir=$dep/"$extlib
fi

if [ $downloadgcc ]; then
Expand Down
44 changes: 19 additions & 25 deletions misc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,31 +50,25 @@ if(WIN32)
endif()

if(MINGW)
get_filename_component(MINGW_BIN_PATH ${CMAKE_CXX_COMPILER} PATH)
if(kst_cross)
# TODO hard coded paths
get_filename_component(mingw_name ${kst_cross} NAME)
set(MINGW_BIN_PATH ${MINGW_BIN_PATH}/../${mingw_name}/lib)
endif()
if(EXISTS ${MINGW_BIN_PATH}/libgcc_s_sjlj-1.dll)
list(APPEND runtime ${MINGW_BIN_PATH}/libgcc_s_sjlj-1.dll)
elseif(EXISTS ${MINGW_BIN_PATH}/libgcc_s_seh-1.dll)
list(APPEND runtime ${MINGW_BIN_PATH}/libgcc_s_seh-1.dll)
elseif(EXISTS ${MINGW_BIN_PATH}/libgcc_s_dw2-1.dll)
list(APPEND runtime ${MINGW_BIN_PATH}/libgcc_s_dw2-1.dll)
endif()
if(EXISTS ${MINGW_BIN_PATH}/libstdc++-6.dll)
list(APPEND runtime ${MINGW_BIN_PATH}/libstdc++-6.dll)
endif()
if(EXISTS ${MINGW_BIN_PATH}/libwinpthread-1.dll)
list(APPEND runtime ${MINGW_BIN_PATH}/libwinpthread-1.dll)
endif()
if(EXISTS ${MINGW_BIN_PATH}/mingwm10.dll)
list(APPEND runtime ${MINGW_BIN_PATH}/mingwm10.dll)
endif()
if(NOT runtime)
message(FATAL_ERROR "No mingw runtime found in ${MINGW_BIN_PATH}")
endif()
set(runtime)
if(kst_cross)
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -print-libgcc-file-name OUTPUT_VARIABLE GCC_LIBGCC OUTPUT_STRIP_TRAILING_WHITESPACE)
list(APPEND runtime /usr/${kst_cross}/lib/libwinpthread-1.dll)
else()
set(GCC_LIBGCC ${CMAKE_CXX_COMPILER})
endif()
get_filename_component(MINGW_RUNTIME_PATH ${GCC_LIBGCC} PATH)
macro(add_runtime_dll _DLL)
file(GLOB GCC_RUNTIME ${MINGW_RUNTIME_PATH}/${_DLL})
list(APPEND runtime ${GCC_RUNTIME})
endmacro()
add_runtime_dll(libgcc*.dll)
add_runtime_dll(libstd*.dll)
add_runtime_dll(libwin*.dll)
if(NOT runtime)
message(FATAL_ERROR "No mingw runtime found in ${MINGW_RUNTIME_PATH}")
endif()

install(FILES ${runtime} DESTINATION bin)
endif()

Expand Down
2 changes: 2 additions & 0 deletions src/widgets/geticon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
* (at your option) any later version. *
* *
***************************************************************************/
#include "geticon.h"

#include <QIcon>
#include <QFile>
#include <QDebug>
Expand Down
4 changes: 3 additions & 1 deletion src/widgets/geticon.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#ifndef GETICON_H
#define GETICON_H

QIcon KstGetIcon(QString icon_name);
#include "kstwidgets_export.h"

KSTWIDGETS_EXPORT QIcon KstGetIcon(QString icon_name);

#endif // GETICON_H