Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6355767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T22:49:51+00:00 2026-05-24T22:49:51+00:00

I started using CMake pretty recently. It is a really easy script language but

  • 0

I started using CMake pretty recently.
It is a really easy script language but there are many tricks to learn and tutorials on the cmake website is not much help.

Basically I want to build my project for

  • Windows (using visual studio 2010) x86 and x64
  • Mac os (using Xcode 4) x86 and x64

Dependending on the OS and plateforme I want to link certain libraries.

I figured out for Windows that I can use WIN32 or WIN64 to set this up.
But I can’t find the equivalence for mac os.
Can someone point me in the right direction?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T22:49:53+00:00Added an answer on May 24, 2026 at 10:49 pm

    In addition to the “if(APPLE)” and other variables that Tobias pointed you to in his answer, you can also inspect what generator you’re using to make decisions on a per-generator basis if necessary.

    if(CMAKE_GENERATOR MATCHES "Xcode")
      ...
    elseif(CMAKE_GENERATOR MATCHES "Win64")
      ...
    endif()
    

    On the Mac, you can build universal binaries by setting the target property OSX_ARCHITECTURES, or the variable CMAKE_OSX_ARCHITECTURES: http://cmake.org/cmake/help/cmake-2-8-docs.html#prop_tgt:OSX_ARCHITECTURES

    Alternatively, you can build two single-architecture binaries using two separate build trees with a single value in CMAKE_OSX_ARCHITECTURES for each build tree.

    On Windows, you should simply have two separate build trees, on for your 32-bit build and one for your 64-bit build.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've recently started using CMake for one of my multi-platform projects, but I'm having
I started using Zend_Paginator, it works everything fine but I noticed that there is
I started using Python in 2001. I loved the simplicity of the language, but
I started using Pyant recenently to do various build/release tasks but have recently discovered
I started using ActiveAdmin recently in a project and almost everything works great but
I started using NetBeans for Python development, and so far it looks pretty good.
I started using LINQ (Language Integrated Query) when it was still in beta, more
i started using nginx upload module (which creates upload files like /tmp/000121545) but i
I have recently started using Rake for my personal projects, mainly because I am
I started using symfony a few weeks ago, and there are some things that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.