Dependencies
This commit is contained in:
parent
2452472b13
commit
5a3487ccd3
1 changed files with 23 additions and 2 deletions
|
@ -16,16 +16,37 @@ elseif(CMAKE_TARGET_OS STREQUAL "linux")
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
file(GLOB_RECURSE core_includes "${OSMAND_ROOT}/core/include/*.h*")
|
||||||
|
file(GLOB_RECURSE core_headers "${OSMAND_ROOT}/core/src/*.h*")
|
||||||
|
file(GLOB_RECURSE core_sources "${OSMAND_ROOT}/core/src/*.c*")
|
||||||
|
file(GLOB_RECURSE core_headers_client "${OSMAND_ROOT}/core/client/*.h*")
|
||||||
|
file(GLOB_RECURSE core_sources_client "${OSMAND_ROOT}/core/client/*.c*")
|
||||||
if(CMAKE_HOST_WIN32 AND NOT CYGWIN)
|
if(CMAKE_HOST_WIN32 AND NOT CYGWIN)
|
||||||
add_custom_command(OUTPUT "${CMAKE_CURRENT_LIST_DIR}/c-src/swig.cpp"
|
add_custom_command(OUTPUT "${CMAKE_CURRENT_LIST_DIR}/c-src/swig.cpp"
|
||||||
COMMAND bash ARGS --login "${CMAKE_CURRENT_LIST_DIR}/generate-swig.sh"
|
COMMAND bash ARGS --login "${CMAKE_CURRENT_LIST_DIR}/generate-swig.sh"
|
||||||
|
DEPENDS
|
||||||
|
${core_includes}
|
||||||
|
${core_headers}
|
||||||
|
${core_sources}
|
||||||
|
${core_headers_client}
|
||||||
|
${core_sources_client}
|
||||||
COMMENT "Generating sources...")
|
COMMENT "Generating sources...")
|
||||||
else()
|
else()
|
||||||
add_custom_command(OUTPUT "${CMAKE_CURRENT_LIST_DIR}/c-src/swig.cpp"
|
add_custom_command(OUTPUT "${CMAKE_CURRENT_LIST_DIR}/c-src/swig.cpp"
|
||||||
COMMAND "${CMAKE_CURRENT_LIST_DIR}/generate-swig.sh"
|
COMMAND "${CMAKE_CURRENT_LIST_DIR}/generate-swig.sh"
|
||||||
|
DEPENDS
|
||||||
|
${core_includes}
|
||||||
|
${core_headers}
|
||||||
|
${core_sources}
|
||||||
|
${core_headers_client}
|
||||||
|
${core_sources_client}
|
||||||
COMMENT "Generating sources...")
|
COMMENT "Generating sources...")
|
||||||
endif()
|
endif()
|
||||||
add_custom_target(OsmAndJNI_swig)
|
add_custom_target(OsmAndJNI_generate_swig
|
||||||
|
ALL
|
||||||
|
DEPENDS
|
||||||
|
"${CMAKE_CURRENT_LIST_DIR}/c-src/swig.cpp"
|
||||||
|
)
|
||||||
set_source_files_properties("${CMAKE_CURRENT_LIST_DIR}/c-src/swig.cpp" PROPERTIES GENERATED TRUE)
|
set_source_files_properties("${CMAKE_CURRENT_LIST_DIR}/c-src/swig.cpp" PROPERTIES GENERATED TRUE)
|
||||||
|
|
||||||
if(CMAKE_SHARED_LIBS_ALLOWED_ON_TARGET)
|
if(CMAKE_SHARED_LIBS_ALLOWED_ON_TARGET)
|
||||||
|
@ -42,7 +63,7 @@ if(CMAKE_SHARED_LIBS_ALLOWED_ON_TARGET)
|
||||||
${target_specific_private_includes}
|
${target_specific_private_includes}
|
||||||
)
|
)
|
||||||
add_dependencies(OsmAndJNI
|
add_dependencies(OsmAndJNI
|
||||||
OsmAndJNI_swig
|
OsmAndJNI_generate_swig
|
||||||
)
|
)
|
||||||
|
|
||||||
if(CMAKE_STATIC_LIBS_ALLOWED_ON_TARGET)
|
if(CMAKE_STATIC_LIBS_ALLOWED_ON_TARGET)
|
||||||
|
|
Loading…
Reference in a new issue