Skip to content

Instantly share code, notes, and snippets.

@ScatteredRay
Created August 29, 2012 23:34
Show Gist options
  • Save ScatteredRay/3520418 to your computer and use it in GitHub Desktop.
Save ScatteredRay/3520418 to your computer and use it in GitHub Desktop.
Two project CMake
SET (this_target PROJECT1)
PROJECT(${this_target})
...
ADD_EXECUTABLE(#{this_target} ...)
SET (this_target PROJECT2)
PROJECT(${this_target})
...
add_definitions (-DMYDEFINE)
TARGET_LINK_LIBRARIES( ${this_target} -myflag )
ADD_EXECUTABLE(#{this_target} ...)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment