squirrel/sq/CMakeLists.txt

24 lines
828 B
CMake
Raw Normal View History

2016-03-06 19:43:57 +01:00
add_executable(sq sq.c)
set_target_properties(sq PROPERTIES LINKER_LANGUAGE C)
2016-03-08 14:43:19 +01:00
target_link_libraries(sq squirrel sqstdlib)
2016-03-13 14:36:10 +01:00
install(TARGETS sq RUNTIME DESTINATION ${INSTALL_BIN_DIR})
2016-01-29 18:56:44 +01:00
2016-03-17 12:44:03 +01:00
if(NOT DEFINED DISABLE_STATIC)
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})
endif()
2016-03-16 00:01:16 +01:00
if(DEFINED LONG_OUTPUT_NAMES)
set_target_properties(sq PROPERTIES OUTPUT_NAME squirrel3)
2016-03-17 12:44:03 +01:00
if(NOT DEFINED DISABLE_STATIC)
set_target_properties(sq_static PROPERTIES OUTPUT_NAME squirrel3_static)
endif()
2016-03-16 00:01:16 +01:00
endif()
2016-01-29 18:56:44 +01:00
2016-03-17 12:44:03 +01:00
if(CMAKE_COMPILER_IS_GNUCXX AND (NOT DEFINED DISABLE_STATIC))
2016-03-06 19:43:57 +01:00
set_target_properties(sq_static PROPERTIES COMPILE_FLAGS "-static -Wl,-static")
endif()