The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=13487 
====================================================================== 
Reported By:                Bill Stouder-Studenmund
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   13487
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2012-08-22 16:31 EDT
Last Modified:              2012-08-22 16:31 EDT
====================================================================== 
Summary:                    CMake can't make kexts
Description: 
CMake can build targets which are apps, but it can't make kexts (kernel
modules). Fix isn't hard.

Additional Information: 
I have gotten CMake to generate kexts that work. The issue that MUST be fixed
in-code is that kexts have an extension of ".kext" while OS X bundles currently
are hard-coded to be ".app".

As a work-around, my CMakeLists.txt has:

      set(SLE System/Library/Extensions)
      ...
      install(TARGETS myKext BUNDLE DESTINATION /${SLE} )
      install(CODE "file(RENAME ${DSTROOT}/${SLE}/myKext.app
${DSTROOT}/${SLE}/myKext.kext)")

I don't know how to fix this, but I suggest two new target properties for an OS
X bundle:

   MACOSX_BUNDLE_EXTENSION      # defaults to "app"
   MACOSX_BUNDLE_TYPE                # type in the Info.plist, defaults to
"APPL"


Generating a kext did also require some custom link options:

      set_target_properties(myKext PROPERTIES LINKER_LANGUAGE C)
      set_target_properties(myKext PROPERTIES LINK_FLAGS "-Xlinker -kext
-lcc_kext")

but these were achievable within the existing set of settings. I also am not
sure exactly which of those are needed; my project has been updated over time
and may not use the recommended starting settings. Also, we mix C and C++
(IOKit).
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2012-08-22 16:31 Bill Stouder-StudenmundNew Issue                               
    
======================================================================

--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to