root/CMakeLists.txt @ 110

Revision 108, 1.8 kB (checked in by smidl, 16 years ago)

Fixes for compilation on Win32 platform

  • Property svn:eol-style set to native
Line 
1# The name of our project is "BDM".  CMakeLists files in this project can
2# refer to the root source directory of the project as ${BDM_SOURCE_DIR} and
3# to the root binary directory of the project as ${BDM_BINARY_DIR}.
4project (BDM)
5
6# In order to be able to use the newly written FindXXX package, the
7# location of the FindXXX.cmake file must be added to the cmake modules
8# list from within a CMakeLists.txt file as follows:
9set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}\\CMake_modules\\")
10
11######################
12#Platform specific
13IF(WIN32)
14
15# IF YOU WANT TO USE YOUR OWN INSTALLATION OF ITTP AND/OR ACML LIBRARIES,
16# THEN IT IS NECESSARY TO CREATE TEXT FILE "\WIN32\LOCAL_PATHS.TXT" WITH
17# COPIES OF THE TWO FOLLOWING LINES AND THEN CORECT BOTH INVOLVED PATHS
18        SET(ITPP_DIR "${BDM_SOURCE_DIR}\\win32\\itpp-4.0.1")
19        SET(ACML_DIR "${BDM_SOURCE_DIR}\\win32\\acml3.6.0")
20
21        INCLUDE(\\win32\\local_paths.txt OPTIONAL)     
22
23        FIND_PACKAGE(ITPP REQUIRED)
24        FIND_PACKAGE(ACML REQUIRED)
25
26        IF(ITPP_FOUND)
27           INCLUDE_DIRECTORIES(${ITPP_INCLUDE_DIR})
28           LINK_DIRECTORIES(${NATIVE_ITPP_LIB_PATH})
29        ENDIF(ITPP_FOUND)
30
31        IF(ACML_FOUND)
32           INCLUDE_DIRECTORIES(${ACML_INCLUDE_DIR})
33           LINK_DIRECTORIES(${NATIVE_ACML_LIB_PATH})
34        ENDIF(ACML_FOUND)
35
36ELSE(WIN32)
37        ADD_DEFINITIONS(-DNODEFAULTLIB:library)
38        FIND_PACKAGE(ITPP REQUIRED)
39
40        IF(ITPP_FOUND)
41           INCLUDE_DIRECTORIES(${ITPP_INCLUDE_DIR})
42           LINK_DIRECTORIES(${NATIVE_ITPP_LIB_PATH})
43        ENDIF(ITPP_FOUND)
44
45        #This is for UNIX makefile which does only one release at a time.
46        SET(CMAKE_BUILD_TYPE Debug)
47        SET(CMAKE_CXX_FLAGS_DEBUG "-g -Wall")
48ENDIF(WIN32)
49
50# Recurse into the "dbm" and "tests" subdirectories.  This does not actually
51# cause another cmake executable to run.  The same process will walk through
52# the project's entire directory structure.
53add_subdirectory (bdm)
54add_subdirectory (tests)
55add_subdirectory (pmsm)
Note: See TracBrowser for help on using the browser.