[CMake] how to build two libraries from same sources but with different defines?
Igor Karatayev
igor.cwer at gmail.com
Mon Apr 27 05:59:19 EDT 2009
Thnx it helps.
On Fri, Apr 24, 2009 at 7:53 PM, Denis Scherbakov
<denis_scherbakov at yahoo.com> wrote:
>
>
> COMPILE_FLAGS in SET_TARGET_PROPERTIES will allow you to set per-target compile flags and definitions.
>
> Denis
>
>
>> I am building my library for two different processors arm7
>> and arm9.
>> devkitArm requeres ARM7 or ARM9 macroses should be defined
>> when
>> building for any processor. I tried to write
>>
>> include_directories(./)
>>
>> set(SOURCES
>> src/library.cpp
>> )
>>
>> add_definitions(-DARM7)
>> add_library(sandbox-arm7 ${SOURCES})
>> remove_definitions(-DARM7)
>> add_definitions(-DARM9)
>> add_library(sandbox-arm9 ${SOURCES})
>> remove_definitions(-DARM9)
>>
>> but it does not work as expected.
>
>
>
>
>
More information about the CMake
mailing list