Sign in to follow this  
Alundra

CMake - Macros for 2 projects

Recommended Posts

Alundra    2316
Hi,
I'm using CMake to make 2 projects who is the same but with differents macros.
It creates me 2 project but adds all macros for both.
Is it possible to just assign macro for one and another macros for the second project ?

here, what I do :
[quote]
file(
GLOB_RECURSE
source_files
src/*
inc/*
)

if(WINDOWS)
add_definitions(-DAPI_DIRECT3D11)
add_library(
ProjectD3D11
STATIC
${source_files}
)
endif()

add_definitions(-DAPI_OPENGL)
add_definitions(-DGLEW_STATIC)
add_definitions(-DSFML_STATIC)
add_library(
ProjectOGL
STATIC
${source_files}
)
[/quote]

Thanks Edited by Alundra

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this