LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-23-2022, 03:21 PM   #1
arfon
Member
 
Registered: Apr 2004
Distribution: Slackware & RHEL
Posts: 382

Rep: Reputation: Disabled
How to use cmake in a slackbuild?


CONFIGURE:
----------
Code:
./configure \
 --prefix-dir=/usr \
 --binary-dir=/games \
 --data-dir=/share/games/openttd \
 --icon-dir=/share/pixmaps \
 --man-dir=/man/man6 \
 --doc-dir=/doc/$PRGNAM-$VERSION \
 --personal-dir=.openttd \
 --install-dir=$PKG

CMAKE:
------
Code:
cmake \
-DCMAKE_INSTALL_PREFIX:PATH=/usr \ ??
??
..
How do you pass the parameters to cmake? I can't find a listing of cmake variables.
 
Old 03-23-2022, 03:31 PM   #2
montagdude
Senior Member
 
Registered: Apr 2016
Distribution: Slackware
Posts: 2,011

Rep: Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619
You can run `ccmake ..` in the build directory (assuming it is one directory below CMakeLists.txt), or check CMakeCache.txt after running cmake the first time.
 
Old 03-23-2022, 03:42 PM   #3
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 15.0 + Multilib
Posts: 2,159

Rep: Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512
arfon --

Not sure these are up-to-date but there are templates for various package types at: https://slackbuilds.org/templates/

Anyway, the cmake-template.SlackBuild suggests trying ccmake:
Code:
<<snip>>

# Your application will probably need different cmake flags; these are only
# examples.  You might use 'ccmake' to see the available flags...
mkdir -p build
cd build
  cmake \
    -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
    -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DLIB_SUFFIX=${LIBDIRSUFFIX} \
    -DMAN_INSTALL_DIR=/usr/man \
    -DCMAKE_BUILD_TYPE=Release ..
  make
  make install/strip DESTDIR=$PKG
cd ..
<<snip>>
HTH

-- kjh

oops. too slow ! What montagdude said

Last edited by kjhambrick; 03-23-2022 at 03:43 PM. Reason: p.s. what montagdude said :)
 
2 members found this post helpful.
Old 03-23-2022, 04:02 PM   #4
kermitdafrog8
Member
 
Registered: Dec 2018
Location: Orlando, FL
Distribution: Slackware AARCH64 and X86_64
Posts: 340

Rep: Reputation: Disabled
How to use cmake in a slackbuild?

cmake -L seems to help me.
 
Old 03-25-2022, 03:01 AM   #5
ozanbaba
Member
 
Registered: May 2003
Location: İzmir
Distribution: Slackware64 15.0 Multilib
Posts: 778

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by kermitdafrog8 View Post
cmake -L seems to help me.
It is helpful. When you run it, it will tell you it is showing only the cached values. I cant shake my feeling if the list is missing or not.
 
Old 03-25-2022, 03:47 PM   #6
kermitdafrog8
Member
 
Registered: Dec 2018
Location: Orlando, FL
Distribution: Slackware AARCH64 and X86_64
Posts: 340

Rep: Reputation: Disabled
How to use cmake in a slackbuild?

Can alway check the CMakeLists.txt file.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] problem with newer cmake options run on slackware cmake 3.5.2 timsoft Slackware 6 05-31-2020 07:51 AM
Hi all, i am new to cmake in linux so i am trying to design a c++ project that connects to mariadb using cmake, but i run into an error. Naptar Linux - Newbie 0 01-19-2019 11:46 AM
Slackware-current: /usr/share/cmake and /usr/share/cmake-3.3 directories igor29768 Slackware 1 11-07-2015 12:37 AM
CMake Strange "Install" behaviour with home-grown software [Linux x86_64, CMake 2.8] ajschaeffer Programming 0 10-24-2011 03:21 AM
cmake: Using find_package(Boost) when FindBoost.cmake is not in the default location damien_d Programming 3 10-27-2010 03:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration