Proper file extension for shared libraries in OSX.

This commit is contained in:
Jussi Pakkanen 2013-03-03 16:59:46 +02:00
parent d663abd7e7
commit 83caae1bcb
1 changed files with 25 additions and 8 deletions

View File

@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import subprocess, os.path
import subprocess, os.path, platform
import coredata
build_filename = 'meson.build'
@ -224,6 +224,12 @@ def find_coverage_tools():
genhtml_exe = None
return (gcovr_exe, lcov_exe, genhtml_exe)
def is_osx():
return platform.system().lower() == 'darwin'
def is_windows():
return platform.system().lower() == 'windows'
header_suffixes = ['h', 'hh', 'hpp', 'hxx', 'H']
class Environment():
@ -249,7 +255,18 @@ class Environment():
self.default_cxx = ['c++']
self.default_static_linker = ['ar']
if is_windows():
self.exe_suffix = 'exe'
self.shared_lib_suffix = 'dll'
self.shared_lib_prefix = ''
self.static_lib_suffix = 'lib'
self.static_lib_prefix = ''
self.object_suffix = 'obj'
else:
self.exe_suffix = ''
if is_osx():
self.shared_lib_suffix = 'dylib'
else:
self.shared_lib_suffix = 'so'
self.shared_lib_prefix = 'lib'
self.static_lib_suffix = 'a'