beginner_
beginner_

Reputation: 7622

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?

Upvotes: 0

Views: 449

Answers (1)

Peter Petrik
Peter Petrik

Reputation: 10165

You need "Unix Makefiles" generator :

cmake .. -G "Unix Makefiles" 

Upvotes: 1

Related Questions