cmake rpm macro(s):

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Appended is a first try at rpm macro'izing the the call to cmake per:
http://fedoraproject.org/wiki/PackagingDrafts/cmake

I chose not to implement the out-of-tree style of build in the PackagingDraft to keep things simple(r).

Made each cmake option a separate macro to make in easier to override.

Comments?

-- Rex

#################################
## /etc/rpm/macros.cmake:

%_cmake_install_prefix -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix}
%_cmake_build_shared_libs -DBUILD_SHARED_LIBS:BOOL=ON
%_cmake_lib_suffix64 -DLIB_SUFFIX=64

%cmake \
  CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
  CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
  FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \
  %{_bindir}/cmake \\\
        %{?_cmake_install_prefix} \\\
        %{?_cmake_build_shared_libs} \\\
%if "%{?_lib}" == "lib64" \
        %{?_cmake_lib_suffix64} \\\
%endif \

###############################3#

--
Fedora-packaging mailing list
Fedora-packaging@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-packaging

[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Forum]     [KDE Users]

  Powered by Linux