cmake/cmake-rpmmacro

21 lines
746 B
Plaintext
Raw Normal View History

%_cmake_lib_suffix64 -DLIB_SUFFIX=64
%__cmake %{_bindir}/cmake
%cmake(d:) \
CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \
bdir=. \
%{-d:dir=%{-d*} ; mkdir -p $dir ; cd $dir ; bdir=.. } \
%__cmake \\\
-DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \\\
-DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir} \\\
-DINCLUDE_INSTALL_DIR:PATH=%{_includedir} \\\
-DLIB_INSTALL_DIR:PATH=%{_libdir} \\\
-DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \\\
-DSHARE_INSTALL_PREFIX:PATH=%{_datadir} \\\
%if "%{?_lib}" == "lib64" \
%{?_cmake_lib_suffix64} \\\
%endif \
-DBUILD_SHARED_LIBS:BOOL=ON $bdir