Skip to content

Commit e12980c

Browse files
authored
support building on architectures other than ARM and x86 (#82)
Fixes #81 .
1 parent 3b589e1 commit e12980c

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/CMakeLists.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,14 @@ if(ARM)
3939
${LIB_NEON_SRC} ${LIB_NEON_INC} )
4040
add_library( ${LIB_NAME_BASE}_dynamic SHARED ${LIB_API_SRC} ${LIB_INC} ${LIB_BASE_SRC} ${LIB_BASE_INC}
4141
${LIB_NEON_SRC} ${LIB_NEON_INC} )
42-
else()
42+
elseif(X86)
4343
add_library( ${LIB_NAME_BASE} STATIC ${LIB_API_SRC} ${LIB_INC} ${LIB_BASE_SRC} ${LIB_BASE_INC} ${LIB_SSE_SRC} ${LIB_SSE_INC}
4444
${LIB_AVX_SRC} ${LIB_AVX_INC} )
4545
add_library( ${LIB_NAME_BASE}_dynamic SHARED ${LIB_API_SRC} ${LIB_INC} ${LIB_BASE_SRC} ${LIB_BASE_INC} ${LIB_SSE_SRC} ${LIB_SSE_INC}
4646
${LIB_AVX_SRC} ${LIB_AVX_INC} )
47+
else()
48+
add_library( ${LIB_NAME_BASE} STATIC ${LIB_API_SRC} ${LIB_INC} ${LIB_BASE_SRC} ${LIB_BASE_INC} )
49+
add_library( ${LIB_NAME_BASE}_dynamic SHARED ${LIB_API_SRC} ${LIB_INC} ${LIB_BASE_SRC} ${LIB_BASE_INC} )
4750
endif()
4851

4952
set_target_properties(${LIB_NAME_BASE}_dynamic PROPERTIES VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} SOVERSION ${LIB_SOVERSION})
@@ -78,8 +81,10 @@ source_group("base\\avx\\source" FILES ${LIB_AVX_SRC})
7881

7982
if(ARM)
8083
include_directories( ${LIB_NAME_BASE} PUBLIC . .. ../inc ./neon)
81-
else()
84+
elseif(X86)
8285
include_directories( ${LIB_NAME_BASE} PUBLIC . .. ../inc ./sse ./avx)
86+
else()
87+
include_directories( ${LIB_NAME_BASE} PUBLIC . .. ../inc)
8388
endif()
8489

8590
set_target_properties(${LIB_NAME_BASE} PROPERTIES FOLDER lib
@@ -98,7 +103,7 @@ elseif( UNIX OR MINGW )
98103

99104
if (ARM)
100105
set_property( SOURCE ${NEON} APPEND PROPERTY COMPILE_FLAGS "-flax-vector-conversions" )
101-
else()
106+
elseif (X86)
102107
set_property( SOURCE ${SSE} APPEND PROPERTY COMPILE_FLAGS "-msse4.1" )
103108
set_property( SOURCE ${AVX} APPEND PROPERTY COMPILE_FLAGS " -mavx2" )
104109
endif()

0 commit comments

Comments
 (0)