On 01/16/2017 11:02 AM, Nat! wrote:

Hi

I am trying to create an OS X framework with resources and headers using
cmake. This is my `CMakeLists.txt` file:

     project( Foo)

     cmake_minimum_required (VERSION 3.7)

     add_library( Foo SHARED
     foo.c
     )

     set_target_properties( Foo PROPERTIES
     FRAMEWORK TRUE
     RESOURCE "foo.md"
     PUBLIC_HEADER "foo.h"
     )


When I run `( mkdir build ; cd build ; cmake .. ; make)` a
`Foo.framework` is generated, but the header and the resource do not
appear in it. What am I missing ? (cmake version 3.7.1)

Try add_library( Foo SHARED foo.c foo.h foo.md).
From what I remember the target properties in this case only apply to sources that are associated with the target.

Unrelated but cmake_minimum_required() should come before project().

Nils
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to