<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style='font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif;'><div>Hi Igor/all<br></div><div><br></div><div>The old standardVM CMake code does something interesting that should roll nicely into the VMMakerCMakeLists.txt.</div><div><br></div><div>In two sentences, </div><div><br></div><div>1 a Plugin's maintains its configuration info that is injected into CMakeLists.txt by one of two templates. (that is currently what we have)</div><div>2. A plugin is included in a build based on its determining its own configuration needs and enabling/disabling itself in the config.h (this is what I am adding) </div><div><br></div><div><br></div><div>Here is 1. above for the MIDIPlugin (this is the equivalent of what the current CMakeVMMaker encapsulates)</div><div><br><blockquote style="border-top-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-top-width: 1px; border-left-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-top-style: solid; border-left-style: solid; border-right-style: solid; border-bottom-style: solid; padding-top: 7px; padding-right: 7px; padding-bottom: 7px; padding-left: 7px; background-color: rgb(245, 245, 245);"><div>*** MIDIPlugin/CMakeLists.txt <br>         EXPECT_UNDEFINED_SYMBOLS ()<br>         ADD_DEFINITIONS (${MIDIPlugin_definitions})<br>         LINK_DIRECTORIES (${MIDIPlugin_link_directories})<br>         INCLUDE_DIRECTORIES (${MIDIPlugin_include_directories}<br>         ${bld}<br>         ${src}/vm<br>         ${cross}/vm<br>         ${src}/plugins/MIDIPlugin<br>         ${unix}/vm<br>         ${unix}/plugins/MIDIPlugin<br>         ${unix}/MIDIPlugin<br>         ${cross}/plugins/MIDIPlugin<br>         )<br><br>ADD_LIBRARY (MIDIPlugin MODULE /.../smalltalk/CMake.oscog/standardVM/src/plugins/MIDIPlugin/MIDIPlugin.c /.../smalltalk/CMake.oscog/standardVM/platforms/unix/plugins/MIDIPlugin/sqUnixMIDI.c )<br>TARGET_LINK_LIBRARIES (MIDIPlugin ${MIDIPlugin_link_libraries})<br>INSTALL (TARGETS MIDIPlugin LIBRARY DESTINATION lib/squeak/4.13.5-1)<br></div></blockquote> 2. Here is the magic (!) </div><div><br><br><blockquote style="border-top-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-top-width: 1px; border-left-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-top-style: solid; border-left-style: solid; border-right-style: solid; border-bottom-style: solid; padding-top: 7px; padding-right: 7px; padding-bottom: 7px; padding-left: 7px; background-color: rgb(245, 245, 245);"><div> *** MIDIPlugin/config.cmake <--this is important. the config.cmake conatins its own library checks.<br>         PLUGIN_REQUIRE_INCLUDE (ALSA_SOUNDLIB alsa/asoundlib.h)<br>         PLUGIN_REQUIRE_LIBRARY (ASOUND asound)<br>         IF (HAVE_ALSA_SOUNDLIB_H AND HAVE_LIBASOUND)<br>         SET (USE_MIDI_ALSA 1)<br>         CONFIG_DEFINE (USE_MIDI_ALSA)<br>         ENDIF ()</div></blockquote><br><br>Those PLUGIN_REQUIRE_INCLUDE and PLUGIN_REQUIRE_LIBRARY are some macro wrappers that invoke CMake commands to resolve the library/include stuff. When you run the cmake script, it outputs what it found like this--><br></div><br><blockquote style="border-top-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-top-width: 1px; border-left-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-top-style: solid; border-left-style: solid; border-right-style: solid; border-bottom-style: solid; padding-top: 7px; padding-right: 7px; padding-bottom: 7px; padding-left: 7px; background-color: rgb(245, 245, 245);"><div><div>-- MIDIPlugin: /usr/include/alsa/asoundlib.h<br>-- MIDIPlugin: /usr/lib64/libasound.so<br></div></div></blockquote> So what this means is that the CMakeVMMaker(Squeak) can ditch the hard-coded library references in plugins in favor of these utilities.<br><div><br></div><div>Hopefully I will have this coded by tonight.</div><div><br></div><div>cheers.</div><div><br></div><div>tty</div><div><br></div><div><br></div></div></body></html>