Improve Linux build
This commit is contained in:
parent
b26f60fb2b
commit
89b5c519af
@ -51,6 +51,10 @@ add_subdirectory(squirrel)
|
||||
add_subdirectory(sqstdlib)
|
||||
add_subdirectory(sq)
|
||||
|
||||
if(NOT WIN32)
|
||||
set_target_properties(squirrel sqstdlib PROPERTIES SOVERSION 0 VERSION 0.0.0)
|
||||
endif()
|
||||
|
||||
if(DEFINED INSTALL_INC_DIR)
|
||||
set(SQ_PUB_HEADERS include/sqconfig.h
|
||||
include/sqstdaux.h
|
||||
|
@ -6,9 +6,13 @@ install(TARGETS sq RUNTIME DESTINATION ${INSTALL_BIN_DIR})
|
||||
add_executable(sq_static sq.c)
|
||||
set_target_properties(sq_static PROPERTIES LINKER_LANGUAGE C)
|
||||
target_link_libraries(sq_static squirrel_static sqstdlib_static)
|
||||
install(TARGETS sq_static RUNTIME DESTINATION ${INSTALL_BIN_DIR})
|
||||
|
||||
if(DEFINED LONG_OUTPUT_NAMES)
|
||||
set_target_properties(sq PROPERTIES OUTPUT_NAME squirrel3)
|
||||
set_target_properties(sq_static PROPERTIES OUTPUT_NAME squirrel3_static)
|
||||
endif()
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
set_target_properties(sq_static PROPERTIES COMPILE_FLAGS "-static -Wl,-static")
|
||||
endif()
|
||||
|
||||
install(TARGETS sq_static RUNTIME DESTINATION ${INSTALL_BIN_DIR})
|
||||
|
@ -15,3 +15,8 @@ install(TARGETS sqstdlib RUNTIME DESTINATION ${INSTALL_BIN_DIR}
|
||||
|
||||
add_library(sqstdlib_static STATIC ${SQSTDLIB_SRC})
|
||||
install(TARGETS sqstdlib_static ARCHIVE DESTINATION ${INSTALL_LIB_DIR})
|
||||
|
||||
if(DEFINED LONG_OUTPUT_NAMES)
|
||||
set_target_properties(sqstdlib PROPERTIES OUTPUT_NAME sqstdlib3)
|
||||
set_target_properties(sqstdlib_static PROPERTIES OUTPUT_NAME sqstdlib3_static)
|
||||
endif()
|
||||
|
@ -18,3 +18,8 @@ install(TARGETS squirrel RUNTIME DESTINATION ${INSTALL_BIN_DIR}
|
||||
|
||||
add_library(squirrel_static STATIC ${SQUIRREL_SRC})
|
||||
install(TARGETS squirrel_static ARCHIVE DESTINATION ${INSTALL_LIB_DIR})
|
||||
|
||||
if(DEFINED LONG_OUTPUT_NAMES)
|
||||
set_target_properties(squirrel PROPERTIES OUTPUT_NAME squirrel3)
|
||||
set_target_properties(squirrel_static PROPERTIES OUTPUT_NAME squirrel3_static)
|
||||
endif()
|
||||
|
Loading…
x
Reference in New Issue
Block a user