Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DD4hep
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cepc
externals
mirroring
DD4hep
Commits
632a274d
Commit
632a274d
authored
4 years ago
by
Marko Petric
Browse files
Options
Downloads
Patches
Plain Diff
Solve problem with lib entension and define BUILD_BYPRODUCTS for ninja
parent
ff90c831
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
DDCAD/CMakeLists.txt
+10
-7
10 additions, 7 deletions
DDCAD/CMakeLists.txt
with
10 additions
and
7 deletions
DDCAD/CMakeLists.txt
+
10
−
7
View file @
632a274d
...
@@ -28,6 +28,13 @@ elseif(DD4HEP_LOAD_ASSIMP)
...
@@ -28,6 +28,13 @@ elseif(DD4HEP_LOAD_ASSIMP)
find_package
(
Git REQUIRED
)
find_package
(
Git REQUIRED
)
set
(
ASSIMP_C_FLAGS
""
)
set
(
ASSIMP_C_FLAGS
""
)
set
(
ASSIMP_CXX_FLAGS
"-Wno-class-memaccess -Wno-tautological-compare -Wno-sizeof-pointer-memaccess"
)
set
(
ASSIMP_CXX_FLAGS
"-Wno-class-memaccess -Wno-tautological-compare -Wno-sizeof-pointer-memaccess"
)
if
(
"
${
CMAKE_BUILD_TYPE
}
"
STREQUAL
"Debug"
)
set
(
ASSIMP_BYPRODUCT
"
${
INSTALL_DIR
}
/lib/libassimpd
${
CMAKE_SHARED_LIBRARY_SUFFIX
}
"
)
else
()
set
(
ASSIMP_BYPRODUCT
"
${
INSTALL_DIR
}
/lib/libassimp
${
CMAKE_SHARED_LIBRARY_SUFFIX
}
"
)
endif
()
ExternalProject_Add
(
ExternalProject_Add
(
assimp_project
assimp_project
SOURCE_DIR
${
CMAKE_CURRENT_BINARY_DIR
}
/external/assimp
SOURCE_DIR
${
CMAKE_CURRENT_BINARY_DIR
}
/external/assimp
...
@@ -42,8 +49,8 @@ elseif(DD4HEP_LOAD_ASSIMP)
...
@@ -42,8 +49,8 @@ elseif(DD4HEP_LOAD_ASSIMP)
-DBUILD_SHARED_LIBS=1
-DBUILD_SHARED_LIBS=1
-DCMAKE_BUILD_TYPE=
${
CMAKE_BUILD_TYPE
}
-DCMAKE_BUILD_TYPE=
${
CMAKE_BUILD_TYPE
}
BUILD_COMMAND
${
CMAKE_BUILD_TOOL
}
install
BUILD_COMMAND
${
CMAKE_BUILD_TOOL
}
install
INSTALL_COMMAND
""
INSTALL_COMMAND
""
BUILD_BYPRODUCTS
${
ASSIMP_BYPRODUCT
}
)
)
ExternalProject_Get_Property
(
assimp_project INSTALL_DIR
)
ExternalProject_Get_Property
(
assimp_project INSTALL_DIR
)
set
(
ASSIMP_INCLUDE_DIRS
"
${
INSTALL_DIR
}
/include"
)
set
(
ASSIMP_INCLUDE_DIRS
"
${
INSTALL_DIR
}
/include"
)
...
@@ -52,11 +59,7 @@ elseif(DD4HEP_LOAD_ASSIMP)
...
@@ -52,11 +59,7 @@ elseif(DD4HEP_LOAD_ASSIMP)
add_library
(
assimp SHARED IMPORTED GLOBAL
)
add_library
(
assimp SHARED IMPORTED GLOBAL
)
add_dependencies
(
assimp assimp_project
)
add_dependencies
(
assimp assimp_project
)
add_library
(
assimp::assimp ALIAS assimp
)
add_library
(
assimp::assimp ALIAS assimp
)
if
(
"
${
CMAKE_BUILD_TYPE
}
"
STREQUAL
"Debug"
)
set_target_properties
(
assimp PROPERTIES IMPORTED_LOCATION
${
ASSIMP_BYPRODUCT
}
)
set_target_properties
(
assimp PROPERTIES IMPORTED_LOCATION
${
INSTALL_DIR
}
/lib/libassimpd.so
)
else
()
set_target_properties
(
assimp PROPERTIES IMPORTED_LOCATION
${
INSTALL_DIR
}
/lib/libassimp.so
)
endif
()
target_include_directories
(
assimp INTERFACE
${
ASSIMP_INCLUDE_DIRS
}
)
target_include_directories
(
assimp INTERFACE
${
ASSIMP_INCLUDE_DIRS
}
)
else
()
else
()
MESSAGE
(
STATUS
"+++> No ASSIMP implementation accessible. CAD reading will not be supported!"
)
MESSAGE
(
STATUS
"+++> No ASSIMP implementation accessible. CAD reading will not be supported!"
)
...
...
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