From: mpech Date: Tue, 14 Jun 2011 11:26:15 +0000 (+0200) Subject: windows compatibility for tools X-Git-Tag: v1.3.0~322 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=bc61697818fa0f090c199bd169b286e46e2e0f26;p=clitk.git windows compatibility for tools (size_t vs uint...) and tests (.lib vs .a) --- diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index bc9beae..d4deb75 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -19,10 +19,12 @@ ADD_DEFINITIONS(-DCLITK_DATA_PATH=\"${CLITK_DATA_PATH}\") add_library(gtest UNKNOWN IMPORTED) set(GTEST_DIR ${ITK_DIR}/../gtest/ CACHE STRING "gtestDir") -#if windows gtestLibName=gtest.dll else libgtest.a -set(gtestLibName libgtest.a) +if(WIN32) + SET(gtestLibName gtest.lib) +else(UNIX) + SET(gtestLibName libgtest.a) +endif(WIN32) set(GTEST_LIB ${GTEST_DIR}/build/${gtestLibName}) -#message(gtestlib name = ${GTEST_LIB}) set_property(TARGET gtest PROPERTY IMPORTED_LOCATION "${GTEST_LIB}") include_directories(${GTEST_DIR}/include/) @@ -32,8 +34,13 @@ ENDIF() IF(CLITK_BUILD_VV) ADD_SUBDIRECTORY(vv) ENDIF() +# IF(CLITK_BUILD_SEGMENTATION) # ADD_SUBDIRECTORY(segmentation) +# ENDIF() +# +# IF(CLITK_BUILD_REGISTATION) # ADD_SUBDIRECTORY(registration) -# ADD_SUBDIRECTORY(common) +# ENDIF() +#ADD_SUBDIRECTORY(common) diff --git a/tests/vv/CMakeLists.txt b/tests/vv/CMakeLists.txt index 24e1d3a..3707d77 100644 --- a/tests/vv/CMakeLists.txt +++ b/tests/vv/CMakeLists.txt @@ -1,18 +1,16 @@ include_directories( ${PROJECT_SOURCE_DIR}/vv ${PROJECT_BINARY_DIR}/vv - ${QT_INCLUDES} - ${QT_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR} ${QT_QTNETWORK_INCLUDE_DIR} + ${QT_QTCORE_INCLUDE_DIR}/../ ${PROJECT_SOURCE_DIR}/common ${PROJECT_SOURCE_DIR}/tools ${PROJECT_SOURCE_DIR}/segmentation ${QT_LIBRARY_DIR} ${GTEST_DIR}/include ) - FILE(GLOB srcs *.cxx) ADD_EXECUTABLE(vvTest ${srcs}) target_link_libraries(vvTest vvLib gtest) diff --git a/tools/clitkImageExtractLine.cxx b/tools/clitkImageExtractLine.cxx index b46a5d0..3d59bf5 100644 --- a/tools/clitkImageExtractLine.cxx +++ b/tools/clitkImageExtractLine.cxx @@ -137,7 +137,7 @@ int main(int argc, char * argv[]) DD(direction); std::vector val(dim[b]); - for (uint i=0; i