Setup and clear of string pool.
[SquirrelJME.git] / nanocoat / cmake / valgrind.cmake
blob8523cffd5a4d72cfe02610930de905c25ffa6a9d
1 # ---------------------------------------------------------------------------
2 # SquirrelJME
3 #     Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
4 # ---------------------------------------------------------------------------
5 # SquirrelJME is under the Mozilla Public License Version 2.0.
6 # See license.mkd for licensing and copyright information.
7 # ---------------------------------------------------------------------------
8 # DESCRIPTION: Valgrind Support on specific platforms
10 # Include pkg-config finder
11 find_package(PkgConfig)
13 # Was pkg-config found?
14 if(PKG_CONFIG_FOUND)
15         # Look for Valgrind
16         pkg_check_modules(VALGRIND valgrind)
18         # Was Valgrind found?
19         if(VALGRIND_FOUND)
20                 # Notice
21                 message(STATUS "Found Valgrind, including it!")
23                 # Valgrind is available
24                 add_compile_definitions(SJME_CONFIG_HAS_VALGRIND=1)
26                 # Include the valgrind includes
27                 include_directories(${VALGRIND_INCLUDE_DIRS})
29                 # Link against the Valgrind libraries
30                 list(APPEND SQUIRRELJME_EXEC_LINK_LIBRARIES
31                         ${VALGRIND_LINK_LIBRARIES})
32         endif()
33 endif()