]> git.lyx.org Git - lyx.git/blob - development/Win32/vld/cmake/CMakeLists.txt
improved mount state check
[lyx.git] / development / Win32 / vld / cmake / CMakeLists.txt
1 #///////////////////////////////////////////////////////////////////////////////
2 #//
3 #//  Visual Leak Detector - CallStack Class Implementations
4 #//  Copyright (c) 2005-2006 Dan Moulding
5 #//  Copyright (c) 2007 Peter Kümmel, CMake files
6 #//
7 #//  This library is free software; you can redistribute it and/or
8 #//  modify it under the terms of the GNU Lesser General Public
9 #//  License as published by the Free Software Foundation; either
10 #//  version 2.1 of the License, or (at your option) any later version.
11 #//
12 #//  This library is distributed in the hope that it will be useful,
13 #//  but WITHOUT ANY WARRANTY; without even the implied warranty of
14 #//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 #//  Lesser General Public License for more details.
16 #//
17 #//  You should have received a copy of the GNU Lesser General Public
18 #//  License along with this library; if not, write to the Free Software
19 #//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
20 #//
21 #//  See COPYING.txt for the full terms of the GNU Lesser General Public License.
22 #//
23 #////////////////////////////////////////////////////////////////////////////////
24
25 cmake_minimum_required(VERSION 2.6.4)
26
27 project(vld)
28
29 include(CheckCXXSourceCompiles)
30
31 check_cxx_source_compiles(
32         "
33         #pragma comment(lib, \"dbghelp.lib\")
34         #define UNICODE
35         #define _UNICODE
36         #include <windows.h>
37         #include <dbghelp.h>
38         int main(){void* ptr = (void*)&SymInitializeW; return 0;}
39         "
40 HAVE_DEBUGGING_TOOLS_FOR_WINDOWS)
41
42 if (NOT HAVE_DEBUGGING_TOOLS_FOR_WINDOWS)
43         message(STATUS "'Debugging Tools for Windows' not found.")
44         message(STATUS "Please install the tools from http://www.microsoft.com/whdc/devtools/debugging/default.mspx")
45         message(STATUS "and add it to the Visual Studio include and lib serach paths.")
46         message(FATAL_ERROR "")
47 endif (NOT HAVE_DEBUGGING_TOOLS_FOR_WINDOWS)
48
49 set(vld_path ${CMAKE_CURRENT_SOURCE_DIR}/..)
50
51 file(GLOB vld_sources ${vld_path}/src/*.cpp)
52 file(GLOB vld_headers ${vld_path}/src/*.h)
53
54 add_definitions(-DVLD_BUILD -DUNICODE -D_UNICODE)
55
56
57 add_library(vld SHARED ${vld_sources} ${vld_headers})
58
59