mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-25 11:52:40 +01:00
Use inih as git submodule
ExternalProject use is discouraged. - Most package build systems do not allow any fetching on configure/build stage - It's insecure the way it's used now, as it does not specify commit hash, so it may fetch whatever malicous code and it'll come unoticed
This commit is contained in:
parent
b7ac33caec
commit
6582704b05
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[submodule "external/inih"]
|
||||||
|
path = external/inih
|
||||||
|
url = https://github.com/benhoyt/inih.git
|
17
cmake/external/inih.cmake
vendored
17
cmake/external/inih.cmake
vendored
@ -1,22 +1,11 @@
|
|||||||
###### External Project: inih
|
###### External Project: inih
|
||||||
include(ExternalProject)
|
include(ExternalProject)
|
||||||
|
|
||||||
SET(INIH_REPOSITORY https://github.com/benhoyt/inih.git)
|
SET(INIH_PREFIX_DIR ${PROJECT_SOURCE_DIR}/external/inih)
|
||||||
SET(INIH_PREFIX_DIR ${EXTERNAL_PREFIX}/inih)
|
|
||||||
|
|
||||||
ExternalProject_Add(inih-repository
|
|
||||||
PREFIX ${INIH_PREFIX_DIR}
|
|
||||||
# Do nothing, we just need the files.
|
|
||||||
CONFIGURE_COMMAND ""
|
|
||||||
BUILD_COMMAND ""
|
|
||||||
INSTALL_COMMAND ""
|
|
||||||
GIT_REPOSITORY ${INIH_REPOSITORY})
|
|
||||||
|
|
||||||
SET(INIH_SOURCES
|
SET(INIH_SOURCES
|
||||||
${INIH_PREFIX_DIR}/src/inih-repository/ini.c)
|
${INIH_PREFIX_DIR}/ini.c)
|
||||||
set_source_files_properties(${INIH_SOURCES} PROPERTIES GENERATED TRUE)
|
|
||||||
add_library(inih
|
add_library(inih
|
||||||
${INIH_SOURCES})
|
${INIH_SOURCES})
|
||||||
|
|
||||||
add_dependencies(inih inih-repository)
|
target_include_directories(inih INTERFACE SYSTEM ${INIH_PREFIX_DIR})
|
||||||
target_include_directories(inih INTERFACE SYSTEM ${INIH_PREFIX_DIR}/src/inih-repository/)
|
|
||||||
|
1
external/inih
vendored
Submodule
1
external/inih
vendored
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 0c3f8ea80ca2c8be8995a0b7b4e84af1641a4dd2
|
Loading…
Reference in New Issue
Block a user