mirror of https://github.com/axmolengine/axmol.git
[cmake] output lib to root/lib
This commit is contained in:
parent
f17aa8b450
commit
9be8ca3714
|
@ -62,7 +62,6 @@ link_directories(
|
|||
add_subdirectory(cocos/math/kazmath)
|
||||
|
||||
# chipmunk library
|
||||
set(BUILD_STATIC 1)
|
||||
add_subdirectory(external/chipmunk/src)
|
||||
|
||||
# box2d library
|
||||
|
|
|
@ -140,3 +140,10 @@ target_link_libraries(cocos2d
|
|||
rt
|
||||
z
|
||||
)
|
||||
|
||||
set_target_properties(cocos2d
|
||||
PROPERTIES
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/lib"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/lib"
|
||||
)
|
||||
|
||||
|
|
|
@ -9,4 +9,11 @@ add_library(audio STATIC
|
|||
|
||||
target_link_libraries(audio
|
||||
fmodex64
|
||||
)
|
||||
)
|
||||
|
||||
set_target_properties(audio
|
||||
PROPERTIES
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/lib"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/lib"
|
||||
)
|
||||
|
||||
|
|
|
@ -18,3 +18,10 @@ set(COCOS_BASE_SRC
|
|||
add_library(cocosbase STATIC
|
||||
${COCOS_BASE_SRC}
|
||||
)
|
||||
|
||||
set_target_properties(cocosbase
|
||||
PROPERTIES
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/lib"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/lib"
|
||||
)
|
||||
|
||||
|
|
|
@ -31,3 +31,10 @@ include_directories(
|
|||
add_library(cocosbuilder STATIC
|
||||
${CCB_SRC}
|
||||
)
|
||||
|
||||
set_target_properties(cocosbuilder
|
||||
PROPERTIES
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/lib"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/lib"
|
||||
)
|
||||
|
||||
|
|
|
@ -45,3 +45,10 @@ add_library(cocostudio STATIC
|
|||
target_link_libraries(cocostudio
|
||||
jsoncpp
|
||||
)
|
||||
|
||||
set_target_properties(cocostudio
|
||||
PROPERTIES
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/lib"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/lib"
|
||||
)
|
||||
|
||||
|
|
|
@ -29,3 +29,10 @@ include_directories(
|
|||
add_library(spine STATIC
|
||||
${SPINE_SRC}
|
||||
)
|
||||
|
||||
set_target_properties(spine
|
||||
PROPERTIES
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/lib"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/lib"
|
||||
)
|
||||
|
||||
|
|
|
@ -27,3 +27,8 @@ add_library(gui STATIC
|
|||
${GUI_SRC}
|
||||
)
|
||||
|
||||
set_target_properties(gui
|
||||
PROPERTIES
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/lib"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/lib"
|
||||
)
|
||||
|
|
|
@ -14,4 +14,10 @@ SET(KAZMATH_SOURCES
|
|||
${CMAKE_SOURCE_DIR}/cocos/math/kazmath/src/GL/matrix.c
|
||||
)
|
||||
|
||||
ADD_SUBDIRECTORY(src)
|
||||
ADD_SUBDIRECTORY(src)
|
||||
|
||||
set_target_properties(kazmath
|
||||
PROPERTIES
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/lib"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/lib"
|
||||
)
|
||||
|
|
|
@ -10,3 +10,10 @@ add_library(network STATIC
|
|||
target_link_libraries(network
|
||||
curl
|
||||
)
|
||||
|
||||
set_target_properties(network
|
||||
PROPERTIES
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/lib"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/lib"
|
||||
)
|
||||
|
||||
|
|
|
@ -32,3 +32,10 @@ include_directories(
|
|||
add_library(extensions STATIC
|
||||
${EXTENSIONS_SRC}
|
||||
)
|
||||
|
||||
set_target_properties(extensions
|
||||
PROPERTIES
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/lib"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/lib"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
set(BUILD_STATIC 1)
|
||||
|
||||
file(GLOB chipmunk_source_files "*.c" "constraints/*.c")
|
||||
file(GLOB chipmunk_public_header "${chipmunk_SOURCE_DIR}/include/chipmunk/*.h")
|
||||
file(GLOB chipmunk_constraint_header "${chipmunk_SOURCE_DIR}/include/chipmunk/constraints/*.h")
|
||||
|
@ -39,3 +41,10 @@ if(BUILD_SHARED OR INSTALL_STATIC)
|
|||
install(FILES ${chipmunk_public_header} DESTINATION include/chipmunk)
|
||||
install(FILES ${chipmunk_constraint_header} DESTINATION include/chipmunk/constraints)
|
||||
endif(BUILD_SHARED OR INSTALL_STATIC)
|
||||
|
||||
set_target_properties(chipmunk_static
|
||||
PROPERTIES
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/lib"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/lib"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
set(JSONCPP_SRC
|
||||
json_reader.cpp
|
||||
json_value.cpp
|
||||
json_value.cpp
|
||||
json_writer.cpp
|
||||
)
|
||||
|
||||
|
@ -12,3 +12,9 @@ add_library(jsoncpp STATIC
|
|||
${JSONCPP_SRC}
|
||||
)
|
||||
|
||||
set_target_properties(jsoncpp
|
||||
PROPERTIES
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/lib"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/lib"
|
||||
)
|
||||
|
||||
|
|
|
@ -5,3 +5,10 @@ set(TINYXML2_SRC
|
|||
add_library(tinyxml2 STATIC
|
||||
${TINYXML2_SRC}
|
||||
)
|
||||
|
||||
set_target_properties(tinyxml2
|
||||
PROPERTIES
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/lib"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/lib"
|
||||
)
|
||||
|
||||
|
|
|
@ -6,3 +6,10 @@ set(UNZIP_SRC
|
|||
add_library(unzip STATIC
|
||||
${UNZIP_SRC}
|
||||
)
|
||||
|
||||
set_target_properties(unzip
|
||||
PROPERTIES
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/lib"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/lib"
|
||||
)
|
||||
|
||||
|
|
|
@ -13,9 +13,9 @@ add_executable(${SAMPLE_NAME}
|
|||
|
||||
target_link_libraries(${SAMPLE_NAME} audio cocos2d)
|
||||
|
||||
set(SAMPLE_BIN_DIR "${CMAKE_BINARY_DIR}/bin/${SAMPLE_NAME}")
|
||||
set(SAMPLE_BIN_DIR "${CMAKE_SOURCE_DIR}/bin/${SAMPLE_NAME}")
|
||||
|
||||
SET_TARGET_PROPERTIES(${SAMPLE_NAME} PROPERTIES
|
||||
set_target_properties(${SAMPLE_NAME} PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY "${SAMPLE_BIN_DIR}")
|
||||
|
||||
COPY_RES( ${SAMPLE_NAME} "Resources/*" "${SAMPLE_BIN_DIR}")
|
||||
|
|
|
@ -154,9 +154,9 @@ target_link_libraries(${SAMPLE_NAME}
|
|||
box2d
|
||||
)
|
||||
|
||||
set(SAMPLE_BIN_DIR "${CMAKE_BINARY_DIR}/bin/${SAMPLE_NAME}")
|
||||
set(SAMPLE_BIN_DIR "${CMAKE_SOURCE_DIR}/bin/${SAMPLE_NAME}")
|
||||
|
||||
SET_TARGET_PROPERTIES(${SAMPLE_NAME} PROPERTIES
|
||||
set_target_properties(${SAMPLE_NAME} PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY "${SAMPLE_BIN_DIR}")
|
||||
|
||||
COPY_RES( ${SAMPLE_NAME} "Resources/*" "${SAMPLE_BIN_DIR}")
|
||||
|
|
|
@ -28,9 +28,9 @@ target_link_libraries(${SAMPLE_NAME}
|
|||
cocos2d
|
||||
)
|
||||
|
||||
set(SAMPLE_BIN_DIR "${CMAKE_BINARY_DIR}/bin/${SAMPLE_NAME}")
|
||||
set(SAMPLE_BIN_DIR "${CMAKE_SOURCE_DIR}/bin/${SAMPLE_NAME}")
|
||||
|
||||
SET_TARGET_PROPERTIES(${SAMPLE_NAME} PROPERTIES
|
||||
set_target_properties(${SAMPLE_NAME} PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY "${SAMPLE_BIN_DIR}")
|
||||
|
||||
COPY_RES( ${SAMPLE_NAME} "Resources/*" "${SAMPLE_BIN_DIR}")
|
||||
|
|
|
@ -28,10 +28,12 @@ target_link_libraries(${SAMPLE_NAME}
|
|||
cocos2d
|
||||
)
|
||||
|
||||
set(SAMPLE_BIN_DIR "${CMAKE_BINARY_DIR}/bin/${SAMPLE_NAME}")
|
||||
set(SAMPLE_BIN_DIR "${CMAKE_SOURCE_DIR}/bin/${SAMPLE_NAME}")
|
||||
|
||||
SET_TARGET_PROPERTIES(${SAMPLE_NAME} PROPERTIES
|
||||
set_target_properties(${SAMPLE_NAME} PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY "${SAMPLE_BIN_DIR}")
|
||||
|
||||
COPY_RES( ${SAMPLE_NAME} "Resources/*" "${SAMPLE_BIN_DIR}")
|
||||
COPY_RES(${SAMPLE_NAME} "Resources/*" "${SAMPLE_BIN_DIR}")
|
||||
COPY_RES_EXTRA(${SAMPLE_NAME} "${CMAKE_SOURCE_DIR}/samples/TestCpp/Resources/*")
|
||||
# "${SAMPLE_BIN_DIR}")
|
||||
|
||||
|
|
Loading…
Reference in New Issue