From 4182d6fb60ee205c4f784c7e252e553687e85f27 Mon Sep 17 00:00:00 2001 From: Nikita Shubin Date: Wed, 26 Feb 2020 16:24:34 +0300 Subject: [PATCH 1/2] cmake: double quotes around the see https://cmake.org/cmake/help/latest/command/file.html#to-native-path --- assimpTargets-debug.cmake.in | 2 +- assimpTargets-release.cmake.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assimpTargets-debug.cmake.in b/assimpTargets-debug.cmake.in index e4ccbfba9..4cb917fd8 100644 --- a/assimpTargets-debug.cmake.in +++ b/assimpTargets-debug.cmake.in @@ -35,7 +35,7 @@ if(MSVC) endif() set(ASSIMP_LIBRARY_SUFFIX "@ASSIMP_LIBRARY_SUFFIX@-${MSVC_PREFIX}-mt" CACHE STRING "the suffix for the assimp windows library" ) - file(TO_NATIVE_PATH ${_IMPORT_PREFIX} _IMPORT_PREFIX) + file(TO_NATIVE_PATH "${_IMPORT_PREFIX}" _IMPORT_PREFIX) if(ASSIMP_BUILD_SHARED_LIBS) set(sharedLibraryName "assimp${ASSIMP_LIBRARY_SUFFIX}@CMAKE_DEBUG_POSTFIX@@CMAKE_SHARED_LIBRARY_SUFFIX@") diff --git a/assimpTargets-release.cmake.in b/assimpTargets-release.cmake.in index 79b643a9a..702109305 100644 --- a/assimpTargets-release.cmake.in +++ b/assimpTargets-release.cmake.in @@ -35,7 +35,7 @@ if(MSVC) endif() set(ASSIMP_LIBRARY_SUFFIX "@ASSIMP_LIBRARY_SUFFIX@-${MSVC_PREFIX}-mt" CACHE STRING "the suffix for the assimp windows library" ) - file(TO_NATIVE_PATH ${_IMPORT_PREFIX} _IMPORT_PREFIX) + file(TO_NATIVE_PATH "${_IMPORT_PREFIX}" _IMPORT_PREFIX) if(ASSIMP_BUILD_SHARED_LIBS) set(sharedLibraryName "assimp${ASSIMP_LIBRARY_SUFFIX}@CMAKE_SHARED_LIBRARY_SUFFIX@") From ed62ed9e7c7965719a99d0b2c0eeb14be04cff2e Mon Sep 17 00:00:00 2001 From: Marc-Antoine Lortie Date: Tue, 10 Mar 2020 13:47:10 -0400 Subject: [PATCH 2/2] Minor changes in CMakeLists files. - Fixed condition preventing ASSIMP_BUILD_ASSIMP_VIEW showing up on first time - Set ASSIMP_BUILD_ASSIMP_VIEW to off by default. - Removed unnecessary reference to DirectX 9 library. --- CMakeLists.txt | 4 ++-- samples/SimpleTexturedDirectx11/CMakeLists.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 16b1f9620..42f975c79 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -583,8 +583,8 @@ ENDIF() ADD_SUBDIRECTORY( code/ ) IF ( ASSIMP_BUILD_ASSIMP_TOOLS ) # The viewer for windows only - IF ( WIN32 AND DirectX_D3DX9_LIBRARY ) - OPTION ( ASSIMP_BUILD_ASSIMP_VIEW "If the Assimp view tool is built. (requires DirectX)" ${DirectX_FOUND} ) + IF ( WIN32 ) + OPTION ( ASSIMP_BUILD_ASSIMP_VIEW "If the Assimp view tool is built. (requires DirectX)" OFF ) IF ( ASSIMP_BUILD_ASSIMP_VIEW ) ADD_SUBDIRECTORY( tools/assimp_view/ ) ENDIF () diff --git a/samples/SimpleTexturedDirectx11/CMakeLists.txt b/samples/SimpleTexturedDirectx11/CMakeLists.txt index 9016b8869..9eec738f5 100644 --- a/samples/SimpleTexturedDirectx11/CMakeLists.txt +++ b/samples/SimpleTexturedDirectx11/CMakeLists.txt @@ -39,7 +39,7 @@ ADD_EXECUTABLE( assimp_simpletextureddirectx11 WIN32 SET_PROPERTY(TARGET assimp_simpletextureddirectx11 PROPERTY DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX}) -TARGET_LINK_LIBRARIES( assimp_simpletextureddirectx11 assimp ${DirectX_LIBRARY} comctl32.lib winmm.lib ) +TARGET_LINK_LIBRARIES( assimp_simpletextureddirectx11 assimp comctl32.lib winmm.lib ) SET_TARGET_PROPERTIES( assimp_simpletextureddirectx11 PROPERTIES OUTPUT_NAME assimp_simpletextureddirectx11 )