Fix cmake build in msvc. Fixes issue 111.
This commit is contained in:
parent
f436a71479
commit
447634d263
@ -1,25 +1,25 @@
|
||||
PROJECT(nvcore)
|
||||
|
||||
SET(CORE_SRCS
|
||||
nvcore.h
|
||||
Algorithms.h
|
||||
Containers.h
|
||||
Debug.h Debug.cpp
|
||||
DefsGnucDarwin.h
|
||||
DefsGnucLinux.h
|
||||
DefsGnucWin32.h
|
||||
DefsVcWin32.h
|
||||
FileSystem.h FileSystem.cpp
|
||||
Library.h Library.cpp
|
||||
Memory.h Memory.cpp
|
||||
Ptr.h
|
||||
RefCounted.h RefCounted.cpp
|
||||
StrLib.h StrLib.cpp
|
||||
Stream.h
|
||||
StdStream.h
|
||||
TextReader.h TextReader.cpp
|
||||
TextWriter.h TextWriter.cpp
|
||||
Timer.h)
|
||||
nvcore.h
|
||||
Algorithms.h
|
||||
Containers.h
|
||||
Debug.h Debug.cpp
|
||||
DefsGnucDarwin.h
|
||||
DefsGnucLinux.h
|
||||
DefsGnucWin32.h
|
||||
DefsVcWin32.h
|
||||
FileSystem.h FileSystem.cpp
|
||||
Library.h Library.cpp
|
||||
Memory.h Memory.cpp
|
||||
Ptr.h
|
||||
RefCounted.h RefCounted.cpp
|
||||
StrLib.h StrLib.cpp
|
||||
Stream.h
|
||||
StdStream.h
|
||||
TextReader.h TextReader.cpp
|
||||
TextWriter.h TextWriter.cpp
|
||||
Timer.h)
|
||||
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
@ -27,18 +27,19 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
ADD_DEFINITIONS(-DNVCORE_EXPORTS)
|
||||
|
||||
IF(UNIX)
|
||||
SET(LIBS ${LIBS} ${CMAKE_DL_LIBS})
|
||||
SET(LIBS ${LIBS} ${CMAKE_DL_LIBS})
|
||||
ENDIF(UNIX)
|
||||
|
||||
IF(NVCORE_SHARED)
|
||||
ADD_LIBRARY(nvcore SHARED ${CORE_SRCS})
|
||||
ADD_DEFINITIONS(-DNVCORE_SHARED=1)
|
||||
ADD_LIBRARY(nvcore SHARED ${CORE_SRCS})
|
||||
ELSE(NVCORE_SHARED)
|
||||
ADD_LIBRARY(nvcore ${CORE_SRCS})
|
||||
ADD_LIBRARY(nvcore ${CORE_SRCS})
|
||||
ENDIF(NVCORE_SHARED)
|
||||
|
||||
TARGET_LINK_LIBRARIES(nvcore ${LIBS})
|
||||
|
||||
INSTALL(TARGETS nvcore
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib/static)
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib/static)
|
||||
|
@ -1,70 +1,71 @@
|
||||
PROJECT(nvimage)
|
||||
|
||||
SET(IMAGE_SRCS
|
||||
nvimage.h
|
||||
FloatImage.h
|
||||
FloatImage.cpp
|
||||
Filter.h
|
||||
Filter.cpp
|
||||
Image.h
|
||||
Image.cpp
|
||||
ImageIO.h
|
||||
ImageIO.cpp
|
||||
ColorBlock.h
|
||||
ColorBlock.cpp
|
||||
BlockDXT.h
|
||||
BlockDXT.cpp
|
||||
DirectDrawSurface.h
|
||||
DirectDrawSurface.cpp
|
||||
Quantize.h
|
||||
Quantize.cpp
|
||||
NormalMap.h
|
||||
NormalMap.cpp
|
||||
PsdFile.h
|
||||
TgaFile.h
|
||||
ColorSpace.h
|
||||
ColorSpace.cpp)
|
||||
nvimage.h
|
||||
FloatImage.h
|
||||
FloatImage.cpp
|
||||
Filter.h
|
||||
Filter.cpp
|
||||
Image.h
|
||||
Image.cpp
|
||||
ImageIO.h
|
||||
ImageIO.cpp
|
||||
ColorBlock.h
|
||||
ColorBlock.cpp
|
||||
BlockDXT.h
|
||||
BlockDXT.cpp
|
||||
DirectDrawSurface.h
|
||||
DirectDrawSurface.cpp
|
||||
Quantize.h
|
||||
Quantize.cpp
|
||||
NormalMap.h
|
||||
NormalMap.cpp
|
||||
PsdFile.h
|
||||
TgaFile.h
|
||||
ColorSpace.h
|
||||
ColorSpace.cpp)
|
||||
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
IF(PNG_FOUND)
|
||||
SET(LIBS ${LIBS} ${PNG_LIBRARIES})
|
||||
INCLUDE_DIRECTORIES(${PNG_INCLUDE_DIR})
|
||||
SET(LIBS ${LIBS} ${PNG_LIBRARIES})
|
||||
INCLUDE_DIRECTORIES(${PNG_INCLUDE_DIR})
|
||||
ENDIF(PNG_FOUND)
|
||||
|
||||
IF(JPEG_FOUND)
|
||||
SET(LIBS ${LIBS} ${JPEG_LIBRARIES})
|
||||
INCLUDE_DIRECTORIES(${JPEG_INCLUDE_DIR})
|
||||
SET(LIBS ${LIBS} ${JPEG_LIBRARIES})
|
||||
INCLUDE_DIRECTORIES(${JPEG_INCLUDE_DIR})
|
||||
ENDIF(JPEG_FOUND)
|
||||
|
||||
IF(TIFF_FOUND)
|
||||
SET(LIBS ${LIBS} ${TIFF_LIBRARIES})
|
||||
INCLUDE_DIRECTORIES(${TIFF_INCLUDE_DIR})
|
||||
SET(LIBS ${LIBS} ${TIFF_LIBRARIES})
|
||||
INCLUDE_DIRECTORIES(${TIFF_INCLUDE_DIR})
|
||||
ENDIF(TIFF_FOUND)
|
||||
|
||||
IF(OPENEXR_FOUND)
|
||||
SET(LIBS ${LIBS} ${OPENEXR_LIBRARIES})
|
||||
INCLUDE_DIRECTORIES(${OPENEXR_INCLUDE_PATHS})
|
||||
SET(LIBS ${LIBS} ${OPENEXR_LIBRARIES})
|
||||
INCLUDE_DIRECTORIES(${OPENEXR_INCLUDE_PATHS})
|
||||
ENDIF(OPENEXR_FOUND)
|
||||
|
||||
IF(FREEIMAGE_FOUND)
|
||||
SET(LIBS ${LIBS} ${FREEIMAGE_LIBRARIES})
|
||||
INCLUDE_DIRECTORIES(${FREEIMAGE_INCLUDE_PATH})
|
||||
SET(LIBS ${LIBS} ${FREEIMAGE_LIBRARIES})
|
||||
INCLUDE_DIRECTORIES(${FREEIMAGE_INCLUDE_PATH})
|
||||
ENDIF(FREEIMAGE_FOUND)
|
||||
|
||||
# targets
|
||||
ADD_DEFINITIONS(-DNVIMAGE_EXPORTS)
|
||||
|
||||
IF(NVIMAGE_SHARED)
|
||||
ADD_LIBRARY(nvimage SHARED ${IMAGE_SRCS})
|
||||
IF(NVIMAGE_SHARED)
|
||||
ADD_DEFINITIONS(-DNVIMAGE_SHARED=1)
|
||||
ADD_LIBRARY(nvimage SHARED ${IMAGE_SRCS})
|
||||
ELSE(NVIMAGE_SHARED)
|
||||
ADD_LIBRARY(nvimage ${IMAGE_SRCS})
|
||||
ADD_LIBRARY(nvimage ${IMAGE_SRCS})
|
||||
ENDIF(NVIMAGE_SHARED)
|
||||
|
||||
TARGET_LINK_LIBRARIES(nvimage ${LIBS} nvcore nvmath posh)
|
||||
|
||||
INSTALL(TARGETS nvimage
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib/static)
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib/static)
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
PROJECT(nvmath)
|
||||
|
||||
SET(MATH_SRCS
|
||||
nvmath.h
|
||||
Vector.h
|
||||
Matrix.h
|
||||
Plane.h Plane.cpp
|
||||
Box.h
|
||||
Color.h
|
||||
Half.h Half.cpp
|
||||
Fitting.h Fitting.cpp)
|
||||
nvmath.h
|
||||
Vector.h
|
||||
Matrix.h
|
||||
Plane.h Plane.cpp
|
||||
Box.h
|
||||
Color.h
|
||||
Half.h Half.cpp
|
||||
Fitting.h Fitting.cpp)
|
||||
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
@ -16,14 +16,15 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
ADD_DEFINITIONS(-DNVMATH_EXPORTS)
|
||||
|
||||
IF(NVMATH_SHARED)
|
||||
ADD_LIBRARY(nvmath SHARED ${MATH_SRCS})
|
||||
ADD_DEFINITIONS(-DNVMATH_SHARED=1)
|
||||
ADD_LIBRARY(nvmath SHARED ${MATH_SRCS})
|
||||
ELSE(NVMATH_SHARED)
|
||||
ADD_LIBRARY(nvmath ${MATH_SRCS})
|
||||
ADD_LIBRARY(nvmath ${MATH_SRCS})
|
||||
ENDIF(NVMATH_SHARED)
|
||||
|
||||
TARGET_LINK_LIBRARIES(nvmath ${LIBS} nvcore)
|
||||
|
||||
INSTALL(TARGETS nvmath
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib/static)
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib/static)
|
||||
|
Loading…
Reference in New Issue
Block a user