Following CMakeLists.txt doesn't work with Xcode (4.5.2). Is there anyone
experienced the same? Thanks!
Visual Studio 10 and Linux makefile works fine.
cmake_minimum_required ( VERSION 2.8.8 )
project( test )
add_library( a_obj OBJECT t1.c t2.c )
add_library( b_obj OBJECT t3.c t4.c )
add_library( a $<TARGET_OBJECTS:a_obj> )
add_library( b $<TARGET_OBJECTS:b_obj> )
add_executable( t t.c )
target_link_libraries( t a b )
::::::::::::::
t.c
::::::::::::::
#include <stdio.h>
int func1( int a );
int func2( int a );
int func3( int a );
int func4( int a );
int main()
{
int a = 100;
printf( "%d %d %d %d %d\n", a, func1(a), func2(a), func3(a), func4(a) );
return 0;
}
::::::::::::::
t1.c
::::::::::::::
int func1( int a )
{
return a*1;
}
::::::::::::::
t2.c
::::::::::::::
int func2( int a )
{
return a*2;
}
::::::::::::::
t3.c
::::::::::::::
int func3( int a )
{
return a*3;
}
::::::::::::::
t4.c
::::::::::::::
int func4( int a )
{
return a*4;
}
Best regards,
Bin Chen
________________________________
Notice:
This message and any included attachments are intended only for the use of the
addressee, and may contain information that is privileged or confidential. If
you are not the intended recipient, you are hereby notified that any
dissemination, distribution or copying of this communication is strictly
prohibited. If you have received this communication in error, please destroy
the original message and any copies or printouts hereof.
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake