J'ai actuellement un fichier Cmake de base qui définit certains répertoires de bibliothèque. Je voudrais intitaliser conditionnellement basé sur le générateur de cible - dans mon cas, le générateur détermine quels répertoires de base à utiliser (générateur de studio visuel 64 bits vs un générateur de studio visuel régulier).CMAKE: initialisation conditionnelle d'une variable de cache dépendant du type de générateur
fichierMes CMakeLists se présente comme suit:
PROJECT(STAT_AUTH)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
SET(BOOST_DIR "c:\\dev_32\\Boost" CACHE PATH "The Boost Directory Path")
SET(PROTOBUF_DIR "c:\\dev_32\\Protobuf" CACHE PATH "The Protobuf directory Path")
SET(OPENSSL_DIR "c:\\dev_32\\OpenSSL" CACHE PATH "The OpenSSL Directory Path"
Comment puis-je initialiser les variables sous condition afin qu'ils se préparent à des versions 64 bits lorsque je produis à des générateurs 64 bits. Le paramètre par défaut devrait apparaître dans le Cmake Gui/ccmake avant de choisir l'option "générer".
C'est une façon beaucoup plus agréable de faire les choses. Merci. –