change cmake

This commit is contained in:
yangchao 2021-10-20 18:34:24 +08:00
parent 7f7266c889
commit 7460910d23
1 changed files with 53 additions and 19 deletions

View File

@ -1,109 +1,142 @@
set(linux_lib_dir ${platform_spec_path}/lib) set(linux_lib_dir ${platform_spec_path}/lib)
MESSAGE(STATUS "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx ${platform_spec_path}") MESSAGE(STATUS "${platform_spec_path}")
add_library(uv STATIC IMPORTED GLOBAL) add_library(uv STATIC IMPORTED GLOBAL)
set_target_properties(uv PROPERTIES set_target_properties(uv PROPERTIES
IMPORTED_LOCATION ${linux_lib_dir}/libuv_a.a IMPORTED_LOCATION ${linux_lib_dir}/libuv/libuv_a.a
INTERFACE_INCLUDE_DIRECTORIES ${platform_spec_path}/include/libuv INTERFACE_INCLUDE_DIRECTORIES ${platform_spec_path}/include/libuv
) )
add_library(mpg123 SHARED IMPORTED GLOBAL) add_library(mpg123 SHARED IMPORTED GLOBAL)
set_target_properties(mpg123 PROPERTIES set_target_properties(mpg123 PROPERTIES
IMPORTED_LOCATION ${linux_lib_dir}/libmpg123.so IMPORTED_LOCATION ${linux_lib_dir}/mpg123/libmpg123.so
INTERFACE_INCLUDE_DIRECTORIES ${platform_spec_path}/include/mpg123 INTERFACE_INCLUDE_DIRECTORIES ${platform_spec_path}/include/mpg123
) )
add_library(ogg STATIC IMPORTED GLOBAL) add_library(ogg STATIC IMPORTED GLOBAL)
set_target_properties(ogg PROPERTIES set_target_properties(ogg PROPERTIES
IMPORTED_LOCATION ${linux_lib_dir}/libogg.a IMPORTED_LOCATION ${linux_lib_dir}/ogg/libogg.a
INTERFACE_INCLUDE_DIRECTORIES ${platform_spec_path}/include/ogg INTERFACE_INCLUDE_DIRECTORIES ${platform_spec_path}/include/ogg
) )
add_library(vorbisfile STATIC IMPORTED GLOBAL) add_library(vorbisfile STATIC IMPORTED GLOBAL)
set_target_properties(vorbisfile PROPERTIES set_target_properties(vorbisfile PROPERTIES
IMPORTED_LOCATION ${linux_lib_dir}/libvorbisfile.a IMPORTED_LOCATION ${linux_lib_dir}/vorbis/libvorbisfile.a
) )
add_library(vorbis STATIC IMPORTED GLOBAL) add_library(vorbis STATIC IMPORTED GLOBAL)
set_target_properties(vorbis PROPERTIES set_target_properties(vorbis PROPERTIES
IMPORTED_LOCATION ${linux_lib_dir}/libvorbis.a IMPORTED_LOCATION ${linux_lib_dir}/vorbis/libvorbis.a
INTERFACE_INCLUDE_DIRECTORIES ${platform_spec_path}/include/vorbis INTERFACE_INCLUDE_DIRECTORIES ${platform_spec_path}/include/vorbis
) )
add_library(libz SHARED IMPORTED GLOBAL) add_library(libz SHARED IMPORTED GLOBAL)
set_target_properties(libz PROPERTIES set_target_properties(libz PROPERTIES
IMPORTED_LOCATION ${linux_lib_dir}/libz.so.1.2.11 IMPORTED_LOCATION ${linux_lib_dir}/libz/libz.so.1.2.11
INTERFACE_INCLUDE_DIRECTORIES ${platform_spec_path}/include/libz INTERFACE_INCLUDE_DIRECTORIES ${platform_spec_path}/include/libz
) )
add_library(sqlite3 SHARED IMPORTED GLOBAL) add_library(sqlite3 SHARED IMPORTED GLOBAL)
set_target_properties(sqlite3 PROPERTIES set_target_properties(sqlite3 PROPERTIES
IMPORTED_LOCATION ${linux_lib_dir}/libsqlite3.so.0.8.6 IMPORTED_LOCATION ${linux_lib_dir}/sqlite/libsqlite3.so.0.8.6
INTERFACE_INCLUDE_DIRECTORIES ${platform_spec_path}/include/sqlite INTERFACE_INCLUDE_DIRECTORIES ${platform_spec_path}/include/sqlite
) )
add_library(v8 STATIC IMPORTED GLOBAL) add_library(v8 STATIC IMPORTED GLOBAL)
set_target_properties(v8 PROPERTIES set_target_properties(v8 PROPERTIES
IMPORTED_LOCATION ${linux_lib_dir}/libv8_monolith.a IMPORTED_LOCATION ${linux_lib_dir}/v8/libv8_monolith.a
) )
add_library(openal SHARED IMPORTED GLOBAL) add_library(openal SHARED IMPORTED GLOBAL)
set_target_properties(openal PROPERTIES set_target_properties(openal PROPERTIES
IMPORTED_LOCATION ${linux_lib_dir}/libopenal.so.1.21.1 IMPORTED_LOCATION ${linux_lib_dir}/openal-soft/libopenal.so.1.21.1
INTERFACE_INCLUDE_DIRECTORIES ${platform_spec_path}/include/openal-soft INTERFACE_INCLUDE_DIRECTORIES ${platform_spec_path}/include/openal-soft
) )
add_library(jpeg STATIC IMPORTED GLOBAL) add_library(jpeg STATIC IMPORTED GLOBAL)
set_target_properties(jpeg PROPERTIES set_target_properties(jpeg PROPERTIES
IMPORTED_LOCATION ${linux_lib_dir}/libjpeg.a IMPORTED_LOCATION ${linux_lib_dir}/jpeg/libjpeg.a
) )
add_library(png STATIC IMPORTED GLOBAL) add_library(png STATIC IMPORTED GLOBAL)
set_target_properties(png PROPERTIES set_target_properties(png PROPERTIES
IMPORTED_LOCATION ${linux_lib_dir}/libpng16.a IMPORTED_LOCATION ${linux_lib_dir}/libpng/libpng16.a
INTERFACE_INCLUDE_DIRECTORIES ${platform_spec_path}/include/libpng INTERFACE_INCLUDE_DIRECTORIES ${platform_spec_path}/include/libpng
) )
add_library(ssl STATIC IMPORTED GLOBAL) add_library(ssl STATIC IMPORTED GLOBAL)
set_target_properties(ssl PROPERTIES set_target_properties(ssl PROPERTIES
IMPORTED_LOCATION ${linux_lib_dir}/libssl.a IMPORTED_LOCATION ${linux_lib_dir}/openssl/libssl.a
INTERFACE_INCLUDE_DIRECTORIES ${platform_spec_path}/include/openssl INTERFACE_INCLUDE_DIRECTORIES ${platform_spec_path}/include/openssl
) )
add_library(crypto STATIC IMPORTED GLOBAL) add_library(crypto STATIC IMPORTED GLOBAL)
set_target_properties(crypto PROPERTIES set_target_properties(crypto PROPERTIES
IMPORTED_LOCATION ${linux_lib_dir}/libcrypto.a IMPORTED_LOCATION ${linux_lib_dir}/openssl/libcrypto.a
) )
add_library(websockets STATIC IMPORTED GLOBAL) add_library(websockets STATIC IMPORTED GLOBAL)
set_target_properties(websockets PROPERTIES set_target_properties(websockets PROPERTIES
IMPORTED_LOCATION ${linux_lib_dir}/libwebsockets.a IMPORTED_LOCATION ${linux_lib_dir}/libwebsockets/libwebsockets.a
INTERFACE_INCLUDE_DIRECTORIES ${platform_spec_path}/include/libwebsockets INTERFACE_INCLUDE_DIRECTORIES ${platform_spec_path}/include/libwebsockets
) )
add_library(curl SHARED IMPORTED GLOBAL) add_library(curl SHARED IMPORTED GLOBAL)
set_target_properties(curl PROPERTIES set_target_properties(curl PROPERTIES
IMPORTED_LOCATION ${linux_lib_dir}/libcurl.so IMPORTED_LOCATION ${linux_lib_dir}/curl/libcurl.so
INTERFACE_INCLUDE_DIRECTORIES ${platform_spec_path}/include/curl INTERFACE_INCLUDE_DIRECTORIES ${platform_spec_path}/include/curl
) )
add_library(webp STATIC IMPORTED GLOBAL) add_library(webp STATIC IMPORTED GLOBAL)
set_target_properties(webp PROPERTIES set_target_properties(webp PROPERTIES
IMPORTED_LOCATION ${linux_lib_dir}/libwebp.a IMPORTED_LOCATION ${linux_lib_dir}/libwebp/libwebp.a
INTERFACE_INCLUDE_DIRECTORIES ${platform_spec_path}/include/libwebp INTERFACE_INCLUDE_DIRECTORIES ${platform_spec_path}/include/libwebp
) )
add_library(tbb STATIC IMPORTED GLOBAL) add_library(tbb STATIC IMPORTED GLOBAL)
set_target_properties(tbb PROPERTIES set_target_properties(tbb PROPERTIES
IMPORTED_LOCATION ${linux_lib_dir}/libtbb_static.a IMPORTED_LOCATION ${linux_lib_dir}/tbb/libtbb_static.a
INTERFACE_INCLUDE_DIRECTORIES ${platform_spec_path}/include/tbb INTERFACE_INCLUDE_DIRECTORIES ${platform_spec_path}/include/tbb
) )
add_library(sdl2 SHARED IMPORTED GLOBAL) add_library(sdl2 SHARED IMPORTED GLOBAL)
set_target_properties(sdl2 PROPERTIES set_target_properties(sdl2 PROPERTIES
IMPORTED_LOCATION ${linux_lib_dir}/libSDL2.so IMPORTED_LOCATION ${linux_lib_dir}/sdl2/libSDL2.so
INTERFACE_INCLUDE_DIRECTORIES ${platform_spec_path}/include/sdl2 INTERFACE_INCLUDE_DIRECTORIES ${platform_spec_path}/include/sdl2
) )
#glslang
add_library(libGenericCodeGen STATIC IMPORTED GLOBAL)
set_target_properties(libGenericCodeGen PROPERTIES
IMPORTED_LOCATION ${linux_lib_dir}/glslang/libGenericCodeGen.a
)
add_library(libglslang STATIC IMPORTED GLOBAL)
set_target_properties(libglslang PROPERTIES
IMPORTED_LOCATION ${linux_lib_dir}/glslang/libglslang.a
)
add_library(libglslang-default-resource-limits STATIC IMPORTED GLOBAL)
set_target_properties(libglslang-default-resource-limits PROPERTIES
IMPORTED_LOCATION ${linux_lib_dir}/glslang/libglslang-default-resource-limits.a
)
add_library(libSPIRV STATIC IMPORTED GLOBAL)
set_target_properties(libSPIRV PROPERTIES
IMPORTED_LOCATION ${linux_lib_dir}/glslang/libSPIRV.a
)
add_library(libMachineIndependent STATIC IMPORTED GLOBAL)
set_target_properties(libMachineIndependent PROPERTIES
IMPORTED_LOCATION ${linux_lib_dir}/glslang/libMachineIndependent.a
)
add_library(libOGLCompiler STATIC IMPORTED GLOBAL)
set_target_properties(libOGLCompiler PROPERTIES
IMPORTED_LOCATION ${linux_lib_dir}/glslang/libOGLCompiler.a
)
add_library(libOSDependent STATIC IMPORTED GLOBAL)
set_target_properties(libOSDependent PROPERTIES
IMPORTED_LOCATION ${linux_lib_dir}/glslang/libOSDependent.a
)
set(glslang_libs_name libMachineIndependent libGenericCodeGen libglslang libglslang-default-resource-limits libSPIRV libOGLCompiler libOSDependent)
list(APPEND CC_EXTERNAL_INCLUDES list(APPEND CC_EXTERNAL_INCLUDES
${platform_spec_path}/include ${platform_spec_path}/include
${platform_spec_path}/include/v8 ${platform_spec_path}/include/v8
@ -129,4 +162,5 @@ list(APPEND CC_EXTERNAL_LIBS
webp webp
tbb tbb
sdl2 sdl2
${glslang_libs_name}
) )