From a2c6ecf8db79b662d0405ee333da837b242b2c59 Mon Sep 17 00:00:00 2001 From: Frederic Cervenansky Date: Mon, 7 Jun 2010 15:23:35 +0000 Subject: [PATCH] changes for X64 compilation. --- CMakeLists.txt | 23 +++++++++++++++++------ src/CMakeLists.txt | 12 +++++++++--- 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0432a40..6d6e6d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,6 +23,7 @@ SET(CREA_VERBOSE_CMAKE TRUE) FIND_PACKAGE(crea REQUIRED) IF (crea_FOUND) INCLUDE(${crea_USE_FILE}) + ENDIF(crea_FOUND) @@ -62,13 +63,16 @@ MARK_AS_ADVANCED( ) IF(WIN32) -INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/win32) -LINK_DIRECTORIES(${PROJECT_SOURCE_DIR}/win32) + IF(MSVC AND CMAKE_SIZEOF_VOID_P MATCHES 4) + INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/win32) + LINK_DIRECTORIES(${PROJECT_SOURCE_DIR}/win32) + endif() + IF(MSVC AND CMAKE_SIZEOF_VOID_P MATCHES 8) + INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/win64) + LINK_DIRECTORIES(${PROJECT_SOURCE_DIR}/win64) + endif() ENDIF(WIN32) - - - SET(LIBNAME creaImageIO) INCLUDE_DIRECTORIES( ${PROJECT_BINARY_DIR} @@ -97,6 +101,13 @@ ENDIF(BUILD_CREA_PACS) # SUBDIRS(appli) SUBDIRS(bbtk) -SUBDIRS(win32) + +IF(MSVC AND CMAKE_SIZEOF_VOID_P MATCHES 4) + SUBDIRS(win32) +endif() +IF(MSVC AND CMAKE_SIZEOF_VOID_P MATCHES 8) + SUBDIRS(win64) +endif() + SUBDIRS(install) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0ed51e1..0dce35f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -94,7 +94,7 @@ ENDIF(USE_XERCES) # Header Files -FILE(GLOB HEADER_CREAIMAGEIO creaImageIOImagePointerHolder.h) +FILE(GLOB HEADER_CREAIMAGEIO creaImageIOImagePointerHolder.h CppSQLite3.h) FILE(GLOB SOURCES_CREAIMAGEIO_PACS PACS/*.cpp) FILE(GLOB HEADER_CREAIMAGEIO_PACS PACS/*.h) @@ -120,6 +120,12 @@ SET( PRIMITIVE_SRCS ${SOURCES_CREAIMAGEIO_TREE} ) +IF(MSVC AND CMAKE_SIZEOF_VOID_P MATCHES 8) + +message("charlie ${CMAKE_SYSTEM_PROCESSOR}") +endif() +#if ( ${CMAKE_EXE_LINKER_FLAGS} MATCHES "message:x64")message("charlie ${CMAKE_SYSTEM_PROCESSOR}")endif() + if( BUILD_CREA_PACS) SET (SRCS ${PRIMITIVE_SRCS} @@ -182,7 +188,7 @@ TARGET_LINK_LIBRARIES(${LIBRARY_NAME} sqlite3) ENDIF(NOT USE_XERCES) - + #---------------------------------------------------------------------------- # INSTALLS LIBRARY FILE(GLOB HEADERS "*.h" "*.txx") @@ -264,5 +270,5 @@ ENDIF(BUILD_DOXYGEN_DOC) INCLUDE_DIRECTORIES( # ${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR}/src -# ${PROJECT_SOURCE_DIR}/src/CppSQLite3 + ) -- 2.47.1