Add CMake rules (Adam Goode)
This commit is contained in:
parent
c6360f8b14
commit
7cf0edd56a
14
Toolchain-mingw32.cmake
Normal file
14
Toolchain-mingw32.cmake
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
SET(CMAKE_SYSTEM_NAME Windows)
|
||||||
|
|
||||||
|
# specify the cross compiler
|
||||||
|
SET(CMAKE_C_COMPILER /usr/bin/i686-pc-mingw32-gcc)
|
||||||
|
SET(CMAKE_CXX_COMPILER /usr/bin/i686-pc-mingw32-g++)
|
||||||
|
|
||||||
|
# where is the target environment
|
||||||
|
SET(CMAKE_FIND_ROOT_PATH /usr/i686-pc-mingw32/sys-root/mingw)
|
||||||
|
|
||||||
|
# search for programs in the build host directories
|
||||||
|
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||||
|
# for libraries and headers in the target directories
|
||||||
|
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||||
|
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
@ -136,6 +136,20 @@
|
|||||||
infodir=%{?buildroot:%{buildroot}}%{_mingw32_infodir} \\\
|
infodir=%{?buildroot:%{buildroot}}%{_mingw32_infodir} \\\
|
||||||
install
|
install
|
||||||
|
|
||||||
|
%_mingw32_cmake %{_mingw32_env} ; \
|
||||||
|
%__cmake \\\
|
||||||
|
-DCMAKE_VERBOSE_MAKEFILE=ON \\\
|
||||||
|
-DCMAKE_INSTALL_PREFIX:PATH=%{_mingw32_prefix} \\\
|
||||||
|
-DCMAKE_INSTALL_LIBDIR:PATH=%{_mingw32_libdir} \\\
|
||||||
|
-DINCLUDE_INSTALL_DIR:PATH=%{_mingw32_includedir} \\\
|
||||||
|
-DLIB_INSTALL_DIR:PATH=%{_mingw32_libdir} \\\
|
||||||
|
-DSYSCONF_INSTALL_DIR:PATH=%{_mingw32_sysconfdir} \\\
|
||||||
|
-DSHARE_INSTALL_PREFIX:PATH=%{_mingw32_datadir} \\\
|
||||||
|
%{?_cmake_skip_rpath} \\\
|
||||||
|
-DBUILD_SHARED_LIBS:BOOL=ON \\\
|
||||||
|
-DCMAKE_TOOLCHAIN_FILE=/usr/share/mingw32/Toolchain-mingw32.cmake
|
||||||
|
|
||||||
|
|
||||||
%_mingw32_description This is the cross-compiled version of this library / tool.\
|
%_mingw32_description This is the cross-compiled version of this library / tool.\
|
||||||
You should only install this package if you want to cross-compile programs for \
|
You should only install this package if you want to cross-compile programs for \
|
||||||
Win32 (32 bit Windows).
|
Win32 (32 bit Windows).
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
%define debug_package %{nil}
|
%define debug_package %{nil}
|
||||||
|
|
||||||
Name: mingw32-filesystem
|
Name: mingw32-filesystem
|
||||||
Version: 50
|
Version: 51
|
||||||
Release: 4%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: MinGW base filesystem and environment
|
Summary: MinGW base filesystem and environment
|
||||||
|
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
@ -19,6 +19,7 @@ Source4: mingw32-find-requires.sh
|
|||||||
Source5: mingw32-find-provides.sh
|
Source5: mingw32-find-provides.sh
|
||||||
Source6: mingw32-scripts.sh
|
Source6: mingw32-scripts.sh
|
||||||
Source7: mingw32-rpmlint.config
|
Source7: mingw32-rpmlint.config
|
||||||
|
Source8: Toolchain-mingw32.cmake
|
||||||
|
|
||||||
Requires: setup
|
Requires: setup
|
||||||
Requires: rpm
|
Requires: rpm
|
||||||
@ -84,7 +85,7 @@ install -m 755 %{SOURCE6} $RPM_BUILD_ROOT%{_libexecdir}/mingw32-scripts
|
|||||||
|
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_bindir}
|
mkdir -p $RPM_BUILD_ROOT%{_bindir}
|
||||||
pushd $RPM_BUILD_ROOT%{_bindir}
|
pushd $RPM_BUILD_ROOT%{_bindir}
|
||||||
for i in mingw32-configure mingw32-make mingw32-pkg-config; do
|
for i in mingw32-configure mingw32-make mingw32-pkg-config mingw32-cmake; do
|
||||||
ln -s %{_libexecdir}/mingw32-scripts $i
|
ln -s %{_libexecdir}/mingw32-scripts $i
|
||||||
done
|
done
|
||||||
popd
|
popd
|
||||||
@ -137,6 +138,9 @@ mkdir -p $RPM_BUILD_ROOT/usr/lib/rpm
|
|||||||
install -m 0755 mingw32-find-requires.sh $RPM_BUILD_ROOT/usr/lib/rpm
|
install -m 0755 mingw32-find-requires.sh $RPM_BUILD_ROOT/usr/lib/rpm
|
||||||
install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT/usr/lib/rpm
|
install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT/usr/lib/rpm
|
||||||
|
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_datadir}/mingw32
|
||||||
|
install -m 644 %{SOURCE8} $RPM_BUILD_ROOT%{_datadir}/mingw32
|
||||||
|
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
@ -152,12 +156,17 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_bindir}/mingw32-configure
|
%{_bindir}/mingw32-configure
|
||||||
%{_bindir}/mingw32-make
|
%{_bindir}/mingw32-make
|
||||||
%{_bindir}/mingw32-pkg-config
|
%{_bindir}/mingw32-pkg-config
|
||||||
|
%{_bindir}/mingw32-cmake
|
||||||
%{_libexecdir}/mingw32-scripts
|
%{_libexecdir}/mingw32-scripts
|
||||||
%{_prefix}/i686-pc-mingw32/
|
%{_prefix}/i686-pc-mingw32/
|
||||||
|
%{_datadir}/mingw32
|
||||||
/usr/lib/rpm/mingw32-*
|
/usr/lib/rpm/mingw32-*
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jun 4 2009 Adam Goode <adam@spicenitz.org> - 51-1
|
||||||
|
- Add CMake rules
|
||||||
|
|
||||||
* Tue Apr 21 2009 Richard W.M. Jones <rjones@redhat.com> - 50-4
|
* Tue Apr 21 2009 Richard W.M. Jones <rjones@redhat.com> - 50-4
|
||||||
- Fix dependency problem with + in DLL name (Thomas Sailer).
|
- Fix dependency problem with + in DLL name (Thomas Sailer).
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user