You don't compile a header only library (unless you're talking about precompiled headers, which I think you don't).

What you need is compiling the sources using it as Objective C.
Which is a matter of adding target_compile_options(<target> PRIVATE "-ObjC") on the target with the sources if I remember correctly.

/Florent

On 30/11/2016 17:55, Henry Borchers wrote:
First time poster so I hope I get the etiquette right. I'm a novice CMake user and I've never come across the type of issue before.

I'm trying to figure out how to use this cross platform header only dialog library in my project.
https://github.com/guillaumechereau/noc

When using this on OSX, it links to "AppKit.h" which is an Objective-c header. How can I tell CMake that this header only library file needs to be compiled as Objective-C if I'm compiling on OSX?

Thanks,
Henry



-- 

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