This commit is contained in:
cfcohen 2015-12-05 22:51:59 +00:00
commit 69a56dd2c4
20 changed files with 146 additions and 58 deletions

View File

@ -1,15 +1,10 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0) CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
PROJECT(NV) PROJECT(NV)
ENABLE_TESTING() ENABLE_TESTING()
SET(NV_CMAKE_DIR "${NV_SOURCE_DIR}/cmake") SET(NV_CMAKE_DIR "${NV_SOURCE_DIR}/cmake")
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${NV_CMAKE_DIR}") SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${NV_CMAKE_DIR}")
# GCC check (needs -std:c++11 flag)
if(CMAKE_COMPILER_IS_GNUCC)
ADD_DEFINITIONS("-std=c++11")
ENDIF(CMAKE_COMPILER_IS_GNUCC)
IF(WIN32) IF(WIN32)
# gnuwin32 paths: # gnuwin32 paths:
SET(GNUWIN32_PATH "${NV_SOURCE_DIR}/extern/gnuwin32") SET(GNUWIN32_PATH "${NV_SOURCE_DIR}/extern/gnuwin32")
@ -29,6 +24,10 @@ MESSAGE(STATUS "Setting optimal options")
MESSAGE(STATUS " Processor: ${NV_SYSTEM_PROCESSOR}") MESSAGE(STATUS " Processor: ${NV_SYSTEM_PROCESSOR}")
MESSAGE(STATUS " Compiler Flags: ${CMAKE_CXX_FLAGS}") MESSAGE(STATUS " Compiler Flags: ${CMAKE_CXX_FLAGS}")
IF(CMAKE_BUILD_TYPE MATCHES "debug")
SET(CMAKE_DEBUG_POSTFIX "_d" CACHE STRING "Postfix for debug build libraries.")
ENDIF()
IF(NVTT_SHARED) IF(NVTT_SHARED)
SET(NVCORE_SHARED TRUE) SET(NVCORE_SHARED TRUE)
SET(NVMATH_SHARED TRUE) SET(NVMATH_SHARED TRUE)

View File

@ -88,6 +88,7 @@ endif()
# and other return variables are present after executing the process. # and other return variables are present after executing the process.
macro(cuda_execute_process status command) macro(cuda_execute_process status command)
set(_command ${command}) set(_command ${command})
cmake_policy(SET CMP0054 OLD)
if(NOT _command STREQUAL "COMMAND") if(NOT _command STREQUAL "COMMAND")
message(FATAL_ERROR "Malformed call to cuda_execute_process. Missing COMMAND as second argument. (command = ${command})") message(FATAL_ERROR "Malformed call to cuda_execute_process. Missing COMMAND as second argument. (command = ${command})")
endif() endif()

10
configure vendored
View File

@ -61,15 +61,15 @@ echo ""
cat > Makefile << EOF cat > Makefile << EOF
all: all:
@make --no-print-directory -C build-$build/ @+make --no-print-directory -C build-$build/
install: install:
@make install --no-print-directory -C build-$build/ @+make install --no-print-directory -C build-$build/
package: package:
@make package --no-print-directory -C build-$build/ @+make package --no-print-directory -C build-$build/
test: test:
@make test --no-print-directory -C build-$build/ @+make test --no-print-directory -C build-$build/
clean: clean:
@make clean --no-print-directory -C build-$build/ @+make clean --no-print-directory -C build-$build/
distclean: distclean:
@rm -Rf build-$build/ @rm -Rf build-$build/
EOF EOF

View File

@ -157,6 +157,7 @@
<ClInclude Include="..\..\..\src\nvcore\Debug.h" /> <ClInclude Include="..\..\..\src\nvcore\Debug.h" />
<ClInclude Include="..\..\..\src\nvcore\DefsVcWin32.h" /> <ClInclude Include="..\..\..\src\nvcore\DefsVcWin32.h" />
<ClInclude Include="..\..\..\src\nvcore\FileSystem.h" /> <ClInclude Include="..\..\..\src\nvcore\FileSystem.h" />
<ClInclude Include="..\..\..\src\nvcore\Library.h" />
<ClInclude Include="..\..\..\src\nvcore\Memory.h" /> <ClInclude Include="..\..\..\src\nvcore\Memory.h" />
<ClInclude Include="..\..\..\src\nvcore\nvcore.h" /> <ClInclude Include="..\..\..\src\nvcore\nvcore.h" />
<ClInclude Include="..\..\..\src\nvcore\Ptr.h" /> <ClInclude Include="..\..\..\src\nvcore\Ptr.h" />
@ -168,6 +169,7 @@
<ItemGroup> <ItemGroup>
<ClCompile Include="..\..\..\src\nvcore\Debug.cpp" /> <ClCompile Include="..\..\..\src\nvcore\Debug.cpp" />
<ClCompile Include="..\..\..\src\nvcore\FileSystem.cpp" /> <ClCompile Include="..\..\..\src\nvcore\FileSystem.cpp" />
<ClCompile Include="..\..\..\src\nvcore\Library.cpp" />
<ClCompile Include="..\..\..\src\nvcore\Memory.cpp" /> <ClCompile Include="..\..\..\src\nvcore\Memory.cpp" />
<ClCompile Include="..\..\..\src\nvcore\StrLib.cpp" /> <ClCompile Include="..\..\..\src\nvcore\StrLib.cpp" />
<ClCompile Include="..\..\..\src\nvcore\TextWriter.cpp" /> <ClCompile Include="..\..\..\src\nvcore\TextWriter.cpp" />

View File

@ -229,14 +229,6 @@
<Project>{50c465fe-b308-42bc-894d-89484482af06}</Project> <Project>{50c465fe-b308-42bc-894d-89484482af06}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly> <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\nvtt\nvtt.vcxproj">
<Project>{1aeb7681-57d8-48ee-813d-5c41cc38b647}</Project>
<Private>false</Private>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">

View File

@ -231,14 +231,6 @@
<Project>{50c465fe-b308-42bc-894d-89484482af06}</Project> <Project>{50c465fe-b308-42bc-894d-89484482af06}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly> <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\nvtt\nvtt.vcxproj">
<Project>{1aeb7681-57d8-48ee-813d-5c41cc38b647}</Project>
<Private>false</Private>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">

View File

@ -378,4 +378,7 @@ Global
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
GlobalSection(Performance) = preSolution
HasPerformanceSessions = true
EndGlobalSection
EndGlobal EndGlobal

View File

@ -290,10 +290,6 @@
RelativePath="..\..\..\src\nvcore\Array.h" RelativePath="..\..\..\src\nvcore\Array.h"
> >
</File> </File>
<File
RelativePath="..\..\..\src\nvcore\Array.inl"
>
</File>
<File <File
RelativePath="..\..\..\src\nvcore\Debug.cpp" RelativePath="..\..\..\src\nvcore\Debug.cpp"
> >
@ -315,11 +311,11 @@
> >
</File> </File>
<File <File
RelativePath="..\..\..\src\nvcore\ForEach.h" RelativePath="..\..\..\src\nvcore\Library.cpp"
> >
</File> </File>
<File <File
RelativePath="..\..\..\src\nvcore\Hash.h" RelativePath="..\..\..\src\nvcore\Library.h"
> >
</File> </File>
<File <File

View File

@ -3,6 +3,10 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
INCLUDE_DIRECTORIES(${NV_SOURCE_DIR}/extern/poshlib) INCLUDE_DIRECTORIES(${NV_SOURCE_DIR}/extern/poshlib)
INCLUDE_DIRECTORIES(${NV_SOURCE_DIR}/extern/stb) INCLUDE_DIRECTORIES(${NV_SOURCE_DIR}/extern/stb)
if(CMAKE_COMPILER_IS_GNUCC)
ADD_COMPILE_OPTIONS(-std=c++11)
ENDIF(CMAKE_COMPILER_IS_GNUCC)
SUBDIRS(nvcore) SUBDIRS(nvcore)
SUBDIRS(nvmath) SUBDIRS(nvmath)
SUBDIRS(nvimage) SUBDIRS(nvimage)
@ -67,7 +71,7 @@ ELSE(CUDA_FOUND)
ENDIF(CUDA_FOUND) ENDIF(CUDA_FOUND)
# Maya # Maya
#INCLUDE(${NV_CMAKE_DIR}/FindMaya.cmake) INCLUDE(${NV_CMAKE_DIR}/FindMaya.cmake)
#IF(MAYA_FOUND) #IF(MAYA_FOUND)
# SET(HAVE_MAYA ${MAYA_FOUND} CACHE BOOL "Set to TRUE if Maya is found, FALSE otherwise") # SET(HAVE_MAYA ${MAYA_FOUND} CACHE BOOL "Set to TRUE if Maya is found, FALSE otherwise")
# MESSAGE(STATUS "Looking for Maya - found") # MESSAGE(STATUS "Looking for Maya - found")
@ -76,7 +80,7 @@ ENDIF(CUDA_FOUND)
#ENDIF(MAYA_FOUND) #ENDIF(MAYA_FOUND)
# FreeImage # FreeImage
#INCLUDE(${NV_CMAKE_DIR}/FindFreeImage.cmake) INCLUDE(${NV_CMAKE_DIR}/FindFreeImage.cmake)
IF(FREEIMAGE_FOUND) IF(FREEIMAGE_FOUND)
SET(HAVE_FREEIMAGE ${FREEIMAGE_FOUND} CACHE BOOL "Set to TRUE if FreeImage is found, FALSE otherwise") SET(HAVE_FREEIMAGE ${FREEIMAGE_FOUND} CACHE BOOL "Set to TRUE if FreeImage is found, FALSE otherwise")
MESSAGE(STATUS "Looking for FreeImage - found") MESSAGE(STATUS "Looking for FreeImage - found")
@ -85,7 +89,7 @@ ELSE(FREEIMAGE_FOUND)
ENDIF(FREEIMAGE_FOUND) ENDIF(FREEIMAGE_FOUND)
# JPEG # JPEG
#INCLUDE(FindJPEG) INCLUDE(FindJPEG)
IF(JPEG_FOUND) IF(JPEG_FOUND)
SET(HAVE_JPEG ${JPEG_FOUND} CACHE BOOL "Set to TRUE if JPEG is found, FALSE otherwise") SET(HAVE_JPEG ${JPEG_FOUND} CACHE BOOL "Set to TRUE if JPEG is found, FALSE otherwise")
MESSAGE(STATUS "Looking for JPEG - found") MESSAGE(STATUS "Looking for JPEG - found")
@ -94,7 +98,7 @@ ELSE(JPEG_FOUND)
ENDIF(JPEG_FOUND) ENDIF(JPEG_FOUND)
# PNG # PNG
#INCLUDE(FindPNG) INCLUDE(FindPNG)
IF(PNG_FOUND) IF(PNG_FOUND)
SET(HAVE_PNG ${PNG_FOUND} CACHE BOOL "Set to TRUE if PNG is found, FALSE otherwise") SET(HAVE_PNG ${PNG_FOUND} CACHE BOOL "Set to TRUE if PNG is found, FALSE otherwise")
MESSAGE(STATUS "Looking for PNG - found") MESSAGE(STATUS "Looking for PNG - found")
@ -113,7 +117,7 @@ ELSE(TIFF_FOUND)
ENDIF(TIFF_FOUND) ENDIF(TIFF_FOUND)
# OpenEXR # OpenEXR
#INCLUDE(${NV_CMAKE_DIR}/FindOpenEXR.cmake) INCLUDE(${NV_CMAKE_DIR}/FindOpenEXR.cmake)
IF(OPENEXR_FOUND) IF(OPENEXR_FOUND)
SET(HAVE_OPENEXR ${OPENEXR_FOUND} CACHE BOOL "Set to TRUE if OpenEXR is found, FALSE otherwise") SET(HAVE_OPENEXR ${OPENEXR_FOUND} CACHE BOOL "Set to TRUE if OpenEXR is found, FALSE otherwise")
MESSAGE(STATUS "Looking for OpenEXR - found") MESSAGE(STATUS "Looking for OpenEXR - found")
@ -132,9 +136,6 @@ ELSE(OPENMP_FOUND)
MESSAGE(STATUS "Looking for OpenMP - not found") MESSAGE(STATUS "Looking for OpenMP - not found")
ENDIF(OPENMP_FOUND) ENDIF(OPENMP_FOUND)
# Qt
FIND_PACKAGE(Qt4)
# Threads # Threads
FIND_PACKAGE(Threads REQUIRED) FIND_PACKAGE(Threads REQUIRED)
MESSAGE(STATUS "Use thread library: ${CMAKE_THREAD_LIBS_INIT}") MESSAGE(STATUS "Use thread library: ${CMAKE_THREAD_LIBS_INIT}")

View File

@ -10,6 +10,7 @@ SET(CORE_SRCS
DefsVcWin32.h DefsVcWin32.h
FileSystem.h FileSystem.cpp FileSystem.h FileSystem.cpp
ForEach.h ForEach.h
Library.h Library.cpp
Memory.h Memory.cpp Memory.h Memory.cpp
Ptr.h Ptr.h
RefCounted.h RefCounted.h

View File

@ -586,7 +586,7 @@ namespace
writeStackTrace(trace, size, 1, lines); writeStackTrace(trace, size, 1, lines);
for (uint i = 0; i < lines.count(); i++) { for (uint i = 0; i < lines.count(); i++) {
nvDebug(lines[i]); nvDebug("%s", lines[i]);
delete lines[i]; delete lines[i];
} }
@ -992,7 +992,7 @@ void debug::dumpInfo()
writeStackTrace(trace, size, 1, lines); writeStackTrace(trace, size, 1, lines);
for (uint i = 0; i < lines.count(); i++) { for (uint i = 0; i < lines.count(); i++) {
nvDebug(lines[i]); nvDebug("%s", lines[i]);
delete lines[i]; delete lines[i];
} }
} }

45
src/nvcore/Library.cpp Normal file
View File

@ -0,0 +1,45 @@
#include "Library.h"
#include "Debug.h"
#if NV_OS_WIN32
#define WIN32_LEAN_AND_MEAN
#define VC_EXTRALEAN
#include <windows.h>
#elif NV_OS_XBOX
#include <Xtl.h>
#else
#include <dlfcn.h>
#endif
void * nvLoadLibrary(const char * name)
{
#if NV_OS_WIN32
return (void *)LoadLibraryExA( name, NULL, 0 );
#elif NV_OS_XBOX
return (void *)LoadLibraryA( name );
#else
return dlopen(name, RTLD_LAZY);
#endif
}
void nvUnloadLibrary(void * handle)
{
nvDebugCheck(handle != NULL);
#if NV_OS_WIN32 || NV_OS_XBOX
FreeLibrary((HMODULE)handle);
#else
dlclose(handle);
#endif
}
void * nvBindSymbol(void * handle, const char * symbol)
{
#if NV_OS_WIN32 || NV_OS_XBOX
return (void *)GetProcAddress((HMODULE)handle, symbol);
#else
return (void *)dlsym(handle, symbol);
#endif
}

51
src/nvcore/Library.h Normal file
View File

@ -0,0 +1,51 @@
// This code is in the public domain -- castano@gmail.com
#pragma once
#ifndef NV_CORE_LIBRARY_H
#define NV_CORE_LIBRARY_H
#include "nvcore.h"
#if NV_OS_WIN32
#define LIBRARY_NAME(name) #name ".dll"
#elif NV_OS_DARWIN
#define NV_LIBRARY_NAME(name) "lib" #name ".dylib"
#else
#define NV_LIBRARY_NAME(name) "lib" #name ".so"
#endif
NVCORE_API void * nvLoadLibrary(const char * name);
NVCORE_API void nvUnloadLibrary(void * lib);
NVCORE_API void * nvBindSymbol(void * lib, const char * symbol);
class NVCORE_CLASS Library
{
public:
Library(const char * name)
{
handle = nvLoadLibrary(name);
}
~Library()
{
if (isValid())
{
nvUnloadLibrary(handle);
}
}
bool isValid() const
{
return handle != NULL;
}
void * bindSymbol(const char * symbol)
{
return nvBindSymbol(handle, symbol);
}
private:
void * handle;
};
#endif // NV_CORE_LIBRARY_H

View File

@ -53,7 +53,7 @@ ELSE(NVIMAGE_SHARED)
ADD_LIBRARY(nvimage ${IMAGE_SRCS}) ADD_LIBRARY(nvimage ${IMAGE_SRCS})
ENDIF(NVIMAGE_SHARED) ENDIF(NVIMAGE_SHARED)
TARGET_LINK_LIBRARIES(nvimage ${LIBS} nvcore nvmath posh bc6h bc7) TARGET_LINK_LIBRARIES(nvimage ${LIBS} nvcore posh bc6h bc7 nvmath)
INSTALL(TARGETS nvimage INSTALL(TARGETS nvimage
RUNTIME DESTINATION bin RUNTIME DESTINATION bin

View File

@ -120,7 +120,10 @@ ThreadPool::ThreadPool(uint workerCount/*=processorCount()*/, bool useThreadAffi
StringBuilder name; StringBuilder name;
name.format("worker %d", i); name.format("worker %d", i);
workers[i].setName(name.release()); // @Leak workers[i].setName(name.release()); // @Leak
workers[i].start(workerFunc, (void *)i); // This code was just wrong. Is this what was intended?
uint* p = new uint; // @Leak
*p = i;
workers[i].start(workerFunc, (void *)p);
} }
allIdle = true; allIdle = true;

View File

@ -47,7 +47,7 @@ ELSE(NVTT_SHARED)
ADD_LIBRARY(nvtt ${NVTT_SRCS}) ADD_LIBRARY(nvtt ${NVTT_SRCS})
ENDIF(NVTT_SHARED) ENDIF(NVTT_SHARED)
TARGET_LINK_LIBRARIES(nvtt ${LIBS} nvcore nvmath nvimage nvthread squish bc6h bc7) TARGET_LINK_LIBRARIES(nvtt ${LIBS} nvcore nvimage nvthread squish bc6h bc7 nvmath)
INSTALL(TARGETS nvtt INSTALL(TARGETS nvtt
RUNTIME DESTINATION bin RUNTIME DESTINATION bin

View File

@ -1464,13 +1464,13 @@ __global__ void compressDXT1(uint firstBlock, uint blockWidth, const uint * perm
const int minIdx = findMinError(errors); const int minIdx = findMinError(errors);
__shared__ uint s_bestEndPoints; __shared__ uint s_bestEndPoints;
__shared__ uint s_bestPermutation; //__shared__ uint s_bestPermutation;
// Only write the result of the winner thread. // Only write the result of the winner thread.
if (threadIdx.x == minIdx) if (threadIdx.x == minIdx)
{ {
s_bestEndPoints = (bestEnd << 16) | bestStart; s_bestEndPoints = (bestEnd << 16) | bestStart;
s_bestPermutation = (bestStart != bestEnd) ? bestPermutation : 0; //s_bestPermutation = (bestStart != bestEnd) ? bestPermutation : 0;
} }
__syncthreads(); __syncthreads();

View File

@ -23,6 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE. // OTHER DEALINGS IN THE SOFTWARE.
#include "nvcore/Debug.h" #include "nvcore/Debug.h"
#include "nvcore/Library.h"
#include "CudaUtils.h" #include "CudaUtils.h"
#if defined HAVE_CUDA #if defined HAVE_CUDA

View File

@ -143,11 +143,11 @@ void FastClusterFit::Compress3( void* block )
int i = 0; int i = 0;
// check all possible clusters for this total order // check all possible clusters for this total order
for( int c0 = 0; c0 <= 16; c0++) for( int c0 = 0; c0 < 16; c0++)
{ {
x1 = zero; x1 = zero;
for( int c1 = 0; c1 <= 16-c0; c1++) for( int c1 = 0; c1 < 16-c0; c1++)
{ {
Vec4 const constants = Vec4((const float *)&s_threeElement[i]); Vec4 const constants = Vec4((const float *)&s_threeElement[i]);
Vec4 const alpha2_sum = constants.SplatX(); Vec4 const alpha2_sum = constants.SplatX();
@ -256,15 +256,15 @@ void FastClusterFit::Compress4( void* block )
int i = 0; int i = 0;
// check all possible clusters for this total order // check all possible clusters for this total order
for( int c0 = 0; c0 <= 16; c0++) for( int c0 = 0; c0 < 16; c0++)
{ {
Vec4 x1 = zero; Vec4 x1 = zero;
for( int c1 = 0; c1 <= 16-c0; c1++) for( int c1 = 0; c1 < 16-c0; c1++)
{ {
Vec4 x2 = zero; Vec4 x2 = zero;
for( int c2 = 0; c2 <= 16-c0-c1; c2++) for( int c2 = 0; c2 < 16-c0-c1; c2++)
{ {
Vec4 const constants = Vec4((const float *)&s_fourElement[i]); Vec4 const constants = Vec4((const float *)&s_fourElement[i]);
Vec4 const alpha2_sum = constants.SplatX(); Vec4 const alpha2_sum = constants.SplatX();

View File

@ -22,7 +22,7 @@ SET(TOOLS nvcompress nvdecompress nvddsinfo nvassemble nvzoom)
IF(GLEW_FOUND AND GLUT_FOUND AND OPENGL_FOUND) IF(GLEW_FOUND AND GLUT_FOUND AND OPENGL_FOUND)
INCLUDE_DIRECTORIES(${GLEW_INCLUDE_PATH} ${GLUT_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${GLEW_INCLUDE_PATH} ${GLUT_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR})
ADD_EXECUTABLE(nvddsview ddsview.cpp cmdline.h) ADD_EXECUTABLE(nvddsview ddsview.cpp cmdline.h)
TARGET_LINK_LIBRARIES(nvddsview nvcore nvmath nvimage ${GLEW_LIBRARY} ${GLUT_LIBRARY} ${OPENGL_LIBRARY}) TARGET_LINK_LIBRARIES(nvddsview nvcore nvimage ${GLEW_LIBRARY} ${GLUT_LIBRARY} ${OPENGL_LIBRARY})
SET(TOOLS ${TOOLS} nvddsview) SET(TOOLS ${TOOLS} nvddsview)
ENDIF(GLEW_FOUND AND GLUT_FOUND AND OPENGL_FOUND) ENDIF(GLEW_FOUND AND GLUT_FOUND AND OPENGL_FOUND)
@ -47,7 +47,8 @@ IF(GCONFTOOL2)
INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${GCONFTOOL2} --makefile-install-rule ${CMAKE_CURRENT_BINARY_DIR}/nvtt-thumbnailer.schema)") INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${GCONFTOOL2} --makefile-install-rule ${CMAKE_CURRENT_BINARY_DIR}/nvtt-thumbnailer.schema)")
ENDIF(GCONFTOOL2) ENDIF(GCONFTOOL2)
# UI tools # UI tools (not functional)
#FIND_PACKAGE(Qt4)
IF(QT4_FOUND) IF(QT4_FOUND)
SET(QT_USE_QTOPENGL TRUE) SET(QT_USE_QTOPENGL TRUE)
INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
@ -64,10 +65,10 @@ IF(QT4_FOUND)
QT4_WRAP_UI(UICS compressdialog.ui) QT4_WRAP_UI(UICS compressdialog.ui)
QT4_WRAP_CPP(MOCS compressdialog.h) QT4_WRAP_CPP(MOCS compressdialog.h)
#QT4_ADD_RESOURCES(RCCS ui/configdialog.rc) QT4_ADD_RESOURCES(RCCS ui/configdialog.rc)
#ADD_EXECUTABLE(nvtt-diag MACOSX_BUNDLE ${SRCS} ${UICS} ${MOCS}) ADD_EXECUTABLE(nvtt-diag MACOSX_BUNDLE ${SRCS} ${UICS} ${MOCS})
#TARGET_LINK_LIBRARIES(nvtt-diag ${LIBS}) TARGET_LINK_LIBRARIES(nvtt-diag ${LIBS})
ENDIF(QT4_FOUND) ENDIF(QT4_FOUND)