Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
coal
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coal
coal
Commits
cc914a95
Unverified
Commit
cc914a95
authored
1 year ago
by
Joris Vaillant
Browse files
Options
Downloads
Patches
Plain Diff
cmake: Use Findassimp.cmake from jrlcmakemodules
parent
5d622362
No related branches found
No related tags found
No related merge requests found
Pipeline
#35148
passed with warnings
1 year ago
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+1
-1
1 addition, 1 deletion
CMakeLists.txt
cmake
+1
-1
1 addition, 1 deletion
cmake
cmake-modules/Findassimp.cmake
+0
-133
0 additions, 133 deletions
cmake-modules/Findassimp.cmake
with
2 additions
and
135 deletions
CMakeLists.txt
+
1
−
1
View file @
cc914a95
...
...
@@ -77,7 +77,7 @@ include("${JRL_CMAKE_MODULES}/ide.cmake")
include
(
CMakeDependentOption
)
SET
(
CMAKE_MODULE_PATH
${
CMAKE_SOURCE_DIR
}
/cmake
-modules/
${
CMAKE_SOURCE_DIR
}
/cmake
/find-external/assimp
${
CMAKE_MODULE_PATH
}
)
set_default_cmake_build_type
(
"RelWithDebInfo"
)
...
...
This diff is collapsed.
Click to expand it.
cmake
@
19f76bb3
Compare
59a8466a
...
19f76bb3
Subproject commit
59a8466a1143e2719b598b55d92a09d65362895
9
Subproject commit
19f76bb3284e46edbdb1162a42dd85217ef0a6a
9
This diff is collapsed.
Click to expand it.
cmake-modules/Findassimp.cmake
deleted
100644 → 0
+
0
−
133
View file @
5d622362
# Try to use AssimConfig if it exists
find_package
(
assimp NO_MODULE QUIET
)
if
(
assimp_FOUND
)
# On Ubuntu 20.04, the Assimp finder is broken
# - INTERFACE_LINK_LIBRARIES is not defined
# - INTERFACE_INCLUDE_DIRECTORIES is set to a wrong path
# ASSIMP_INCLUDE_DIRS and IMPORTED_LOCATION_RELEASE are well computed,
# so we can redefine some target properties with them
get_target_property
(
_ASSIMP_INC_DIR assimp::assimp INTERFACE_INCLUDE_DIRECTORIES
)
set
(
_ASSIMP_TARGET_OK TRUE
)
foreach
(
v
${
_ASSIMP_INC_DIR
}
)
if
(
NOT EXISTS
${
v
}
)
set
(
_ASSIMP_TARGET_OK FALSE
)
endif
()
endforeach
()
if
(
NOT _ASSIMP_TARGET_OK
)
get_target_property
(
_ASSIMP_IMP_LOC_RELEASE assimp::assimp IMPORTED_LOCATION_RELEASE
)
set_target_properties
(
assimp::assimp PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES
"
${
ASSIMP_INCLUDE_DIRS
}
"
IMPORTED_LOCATION
"
${
_ASSIMP_IMP_LOC_RELEASE
}
"
)
endif
()
else
()
if
(
CMAKE_SIZEOF_VOID_P EQUAL 8
)
set
(
ASSIMP_ARCHITECTURE
"64"
)
elseif
(
CMAKE_SIZEOF_VOID_P EQUAL 4
)
set
(
ASSIMP_ARCHITECTURE
"32"
)
endif
(
CMAKE_SIZEOF_VOID_P EQUAL 8
)
set
(
ASSIMP_ROOT_DIR CACHE PATH
"ASSIMP root directory"
)
if
(
WIN32
)
# Find path of each library
find_path
(
ASSIMP_INCLUDE_DIR
NAMES
assimp/anim.h
HINTS
${
ASSIMP_ROOT_DIR
}
/include
)
SET
(
assimp_INCLUDE_DIRS
${
ASSIMP_INCLUDE_DIR
}
)
if
(
MSVC12
)
set
(
ASSIMP_MSVC_VERSIONS
"vc120"
)
else
()
set
(
ASSIMP_MSVC_VERSIONS
"vc140;vc141;vc142;vc143"
)
endif
(
MSVC12
)
if
(
MSVC
)
find_path
(
ASSIMP_LIBRARY_DIR
NAMES
assimp.lib
assimpd.lib
HINTS
${
ASSIMP_ROOT_DIR
}
/lib
${
ASSIMP_ARCHITECTURE
}
)
find_library
(
ASSIMP_LIBRARY_RELEASE assimp.lib PATHS
${
ASSIMP_LIBRARY_DIR
}
)
find_library
(
ASSIMP_LIBRARY_DEBUG assimpd.lib PATHS
${
ASSIMP_LIBRARY_DIR
}
)
IF
(
NOT ASSIMP_LIBRARY_RELEASE AND NOT ASSIMP_LIBRARY_DEBUG
)
foreach
(
ASSIMP_MSVC_VERSION
${
ASSIMP_MSVC_VERSIONS
}
)
find_path
(
ASSIMP_LIBRARY_DIR
NAMES
assimp-
${
ASSIMP_MSVC_VERSION
}
-mt.lib
assimp-
${
ASSIMP_MSVC_VERSION
}
-mtd.lib
HINTS
${
ASSIMP_ROOT_DIR
}
/lib
${
ASSIMP_ARCHITECTURE
}
)
find_library
(
ASSIMP_LIBRARY_RELEASE assimp-
${
ASSIMP_MSVC_VERSION
}
-mt.lib PATHS
${
ASSIMP_LIBRARY_DIR
}
)
find_library
(
ASSIMP_LIBRARY_DEBUG assimp-
${
ASSIMP_MSVC_VERSION
}
-mtd.lib PATHS
${
ASSIMP_LIBRARY_DIR
}
)
IF
(
ASSIMP_LIBRARY_RELEASE OR ASSIMP_LIBRARY_DEBUG
)
break
()
ENDIF
()
endforeach
()
ENDIF
(
NOT ASSIMP_LIBRARY_RELEASE AND NOT ASSIMP_LIBRARY_DEBUG
)
IF
(
NOT ASSIMP_LIBRARY_RELEASE AND NOT ASSIMP_LIBRARY_DEBUG
)
SET
(
assimp_FOUND FALSE
)
return
()
ENDIF
()
IF
(
ASSIMP_LIBRARY_DEBUG
)
set
(
ASSIMP_LIBRARY
optimized
${
ASSIMP_LIBRARY_RELEASE
}
debug
${
ASSIMP_LIBRARY_DEBUG
}
)
ELSE
()
set
(
ASSIMP_LIBRARY
optimized
${
ASSIMP_LIBRARY_RELEASE
}
)
ENDIF
()
SET
(
assimp_LIBRARIES
${
ASSIMP_LIBRARY
}
)
endif
()
else
(
WIN32
)
find_path
(
assimp_INCLUDE_DIRS
NAMES assimp/postprocess.h assimp/scene.h assimp/version.h assimp/config.h assimp/cimport.h
PATHS /usr/local/include
PATHS /usr/include/
HINTS
${
ASSIMP_ROOT_DIR
}
/include
)
find_library
(
assimp_LIBRARIES
NAMES assimp
PATHS /usr/local/lib/
PATHS /usr/lib64/
PATHS /usr/lib/
)
if
(
assimp_INCLUDE_DIRS AND assimp_LIBRARIES
)
SET
(
assimp_FOUND TRUE
)
ENDIF
(
assimp_INCLUDE_DIRS AND assimp_LIBRARIES
)
if
(
assimp_FOUND
)
if
(
NOT assimp_FIND_QUIETLY
)
message
(
STATUS
"Found asset importer library:
${
assimp_LIBRARIES
}
"
)
endif
(
NOT assimp_FIND_QUIETLY
)
else
(
assimp_FOUND
)
if
(
assimp_FIND_REQUIRED
)
message
(
FATAL_ERROR
"Could not find asset importer library"
)
endif
(
assimp_FIND_REQUIRED
)
endif
(
assimp_FOUND
)
endif
(
WIN32
)
endif
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment