Building bullet3 on Windows 10 - not all libraries installed - cmake

I have built bullet3-3.08 on Windows using cmake (commands have been executed from the build folder created in the bullet3-3.08 directory):
cmake -G "Visual Studio 16 2019" -A x64 -D "CMAKE_INSTALL_PREFIX:PATH=C:/Workspace/MyLibs/bullet3-3.08" ..
cmake --build . --config Release --parallel 8 --target install
I have noticed that the installation folder doesn't contain all built libraries, for example BulletCollision.lib is present the build/lib/Release folder but hasn't been installed in the C:/Workspace/MyLibs/bullet3-3.08/lib Moreover C:/Workspace/MyLibs/bullet3-3.08/include directory doesn't contain all headers, for example btBulletDynamicsCommon.h
How to fix that ? I don't want to copy headers/libs manually.

When building bullet3-3.08 on Windows with Visual Studio project files the libraries are not installed by default.
You need to add -DINSTALL_LIBS=ON to your command line to enable the installation, e.g.
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_INSTALL_PREFIX:PATH=C:/Workspace/MyLibs/bullet3-3.08 -DINSTALL_LIBS=ON ..

Related

Use CMake binares to build cpp projects without installing CMake

I want to use specific version of CMake 3.19.0 for Ubuntu 14.04 (32-bits) without installing CMake (use only binaries).
I tried to build CMake 3.19.0 on my test machine. It builded and installed successfully. In install_manifest.txt I see lot of files that were installed on my test system.
So, I tried to copy only installed binaries from /usr/local/bin/ (this is default path where CMake binaries were installed) and paste it to another machine that doesn't know about CMake. I paste 3 binaries: cmake, ctest, cpack to /usr/local/bin/.
If I run which cmake it shows path:
/usr/local/bin/cmake
If I run cmake --verison it shows:
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/usr/local/share/cmake-3.19
cmake version 3.19.0
CMake suite maintained and supported by Kitware (kitware.com/cmake).
It looks like CMake needs some modules that I haven't copied yet. I tried to build my cpp project and it shows me:
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/usr/local/share/cmake-3.19
CMake Error: Error executing cmake::LoadCache(). Aborting.
What are the minimum required modules needed for stable building? And where I should copy it?
Just copied builded Modules and Templates directories from cmake-3.19.0 build directory to /usr/local/share/cmake-3.19

cmake installation on aix installed but command not found

i installed cmake on my AIX 7.2
bash-3.2# yum install cmake
Setting up Install Process
Package cmake-3.16.0-2.ppc already installed and latest version
Nothing to do
bash-3.2#
but running it .
bash-3.2$ cmake
bash: cmake: command not found
there is also no folder for cmake in /opt/bin directory
The RPM's on AIX likely install software to /opt/freeware so you probably need /opt/freeware/bin in your PATH to casually use "cmake" on the command line.
You can verify the paths installed by a package with e.g.
rpm -ql cmake|grep bin/

Generating libLLVM is not supported on MSVC

I'm trying to build and install LLVM 9.0.0 on my Windows 10 machine.
I have CMake and Visual Studio 2019 with C++ tools installed, and using the following strategy to build (and install) LLVM using CMake:
> cmake . -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_INCLUDE_TESTS=OFF
> cmake --build . --config Release --target INSTALL -j8
The following error occurs on the first command:
Generating libLLVM is not supported on MSVC
Note that I'm required to build LLVM dynamically otherwise it won't link. Any ideas?

CMake Error at CMakeLists.txt:7 (PROJECT): Failed to run MSBuild command:

I am building a GPU Version of lightgbm(Windows). I've followed all the Installation Guide in https://github.com/Microsoft/LightGBM/blob/master/docs/Installation-Guide.rst#build-gpu-version:
Windows On Windows GPU version of LightGBM can be built using OpenCL,
Boost, CMake and VS Build Tools or MinGW.
If you use MinGW, the build procedure is similar to the build on
Linux. Refer to GPU Windows Compilation to get more details.
Following procedure is for the MSVC (Microsoft Visual C++) build.
Install Git for Windows, CMake (3.8 or higher) and VS Build Tools (VS
Build Tools is not needed if Visual Studio (2015 or newer) is
installed).
Install OpenCL for Windows. The installation depends on the brand
(NVIDIA, AMD, Intel) of your GPU card.
For running on Intel, get Intel SDK for OpenCL. For running on AMD,
get AMD APP SDK. For running on NVIDIA, get CUDA Toolkit. Further
reading and correspondence table: GPU SDK Correspondence and Device
Targeting Table.
Install Boost Binary.
Note: Match your Visual C++ version:
Visual Studio 2015 -> msvc-14.0-64.exe,
Visual Studio 2017 -> msvc-14.1-64.exe.
Run the following commands:
Set BOOST_ROOT=C:\local\boost_1_64_0\
Set BOOST_LIBRARYDIR=C:\local\boost_1_64_0\lib64-msvc-14.0
git clone --recursive https://github.com/Microsoft/LightGBM
cd LightGBM
mkdir build
cd build
cmake -DCMAKE_GENERATOR_PLATFORM=x64 -DUSE_GPU=1 ..
cmake --build . --target ALL_BUILD --config Release
But in the last step when I input
cmake -DCMAKE_GENERATOR_PLATFORM=x64 -DUSE_GPU=1 ..
I got the error:
C:\Windows\System32\LightGBM\build>cmake -DCMAKE_GENERATOR_PLATFORM=x64 -DUSE_GPU=1 ..
-- Selecting Windows SDK version to target Windows 10.0.17134.
CMake Error at CMakeLists.txt:7 (PROJECT):
Failed to run MSBuild command:
C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe
to get the value of VCTargetsPath:
Microsoft (R) 生成引擎版本 14.0.25420.1
版权所有(C) Microsoft Corporation。保留所有权利。
MSBUILD : error MSB1009: 项目文件不存在。
开关:VCTargetsPath.vcxproj
Exit code: 1
-- Configuring incomplete, errors occurred!
See also "C:/Windows/System32/LightGBM/build/CMakeFiles/CMakeOutput.log".
CMakeOutput.log:
The system is: Windows - 10.0.17134 - AMD64

Install (build) C++ dependency for Windows using g++ with cygwin

For context I'm completely new to cmake and C++ compiling. I'm trying to compile an application only available for linux in windows using g++. That application has a 3rd party library which I need to install/build on Windows as well.
That library uses cmake. When running cmake it defaults to "Building for: Visual Studio 12" and then fails due to an issue with time.h Anyway how can I set it to use cygwins g++ instead of visual studio? Or am I misunderstanding soemthing? I also tried this to no avail:
cmake ../ -DCMAKE_CXX_COMPILER=g++
cmake ../ -DCMAKE_CXX_COMPILER:STRING=g++
Where can this setting be configured so that it will take the compiler I desire?
You need "Unix Makefiles" generator :
cmake .. -G "Unix Makefiles"