Changeset 20

Show
Ignore:
Timestamp:
02/16/08 16:29:52 (17 years ago)
Author:
smidl
Message:

priprava Cmake pro win

Files:
3 modified

Legend:

Unmodified
Added
Removed
  • CMakeLists.txt

    r19 r20  
    44project (BDM) 
    55 
    6 #This is for UNIX makefile which does only one release at a time. 
    7 SET(CMAKE_BUILD_TYPE Debug) 
     6###################### 
     7#Platform specific 
     8IF(WIN32) 
     9        ########### TOHLE BY BYLO HEZKE JAKO MODUL DO CMakeu.... 
     10  # najdi knihovny a include... 
     11  FIND_PATH(ITPP_INCLUDE_DIR itpp/itbase.h 
     12        C:\\ 
     13        # a dalsi 
     14        ) 
     15  FIND_LIBRARY(ITPP_LIB_DIR 
     16        libitpp 
     17        ${ITPP_INCLUDE}/lib 
     18        C:\\ 
     19        C:\\Program Files 
     20# a dalsi 
     21        ) 
     22  INCLUDE_DIRECTORY(ITPP_INCLUDE) 
     23ELSE(WIN32) 
     24        #This is for UNIX makefile which does only one release at a time. 
     25        SET(CMAKE_BUILD_TYPE Debug) 
     26ENDIF(WIN32) 
    827 
    928# Recurse into the "dbm" and "tests" subdirectories.  This does not actually 
  • bdm/CMakeLists.txt

    r19 r20  
    1 # Create a library called "Hello" which includes the source file "hello.cxx". 
    2 # The extension is already found.  Any number of sources could be listed here 
     1# Create a library called "bdm" which includes sources from all directories 
    32 
    4 add_library (bdm itpp_ext.cpp math/libDC.cpp stat/libBM stat/libEF stat/libDS  stat/libFN estim/libKF estim/libPF) 
     3SET(BdmMath math/libDC.cpp) 
     4SET(BdmStat stat/libDS.cpp stat/libFN.cpp stat/libBM stat/libEF ) 
     5SET(BdmEstim estim/libKF.cpp estim/libPF.cpp) 
    56 
    6 add_subdirectory (stat) 
    7 add_subdirectory (math) 
    8 add_subdirectory (estim) 
    97 
     8add_library (bdm itpp_ext.cpp ${BdmMath} ${BdmStat} ${BdmEstim}) 
     9 
  • tests/CMakeLists.txt

    r19 r20  
    1 # Make sure the compiler can find include files from our Hello library. 
     1# Make sure the compiler can find include files from our Bdm library. 
    22include_directories (${BDM_SOURCE_DIR}/bdm) 
    33 
    44# Make sure the linker can find the Hello library once it is built. 
    55link_directories (${BDM_BINARY_DIR}/bdm) 
     6 
     7## Save all needed libraries in variable BdmLibs 
     8SET(BdmLibs bdm itpp) 
     9 
     10IF(WIN32) 
     11        IF(ITPP_INCLUDE_DIR) 
     12                include_directories(${ITPP_INCLUDE_DIR}) 
     13        ENDIF(ITPP_INCLUDE_DIR) 
     14        IF(ITPP_LIB_DIR) 
     15                link_directories(${ITPP_LIB_DIR}) 
     16        ENDIF(ITPP_LIB_DIR) 
     17ENDIF(WIN32) 
    618 
    719# Add executable called "helloDemo" that is built from the source files 
     
    1224 
    1325# Link the executable to the Hello library. 
    14 target_link_libraries (test0 bdm itpp) 
    15 target_link_libraries (testKF bdm itpp) 
    16 target_link_libraries (testPF bdm itpp) 
     26target_link_libraries (test0 ${BdmLibs}) 
     27target_link_libraries (testKF ${BdmLibs}) 
     28target_link_libraries (testPF ${BdmLibs})