1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 08:47:17 +01:00

Compare commits

...

3 Commits

Author SHA1 Message Date
Sandu Liviu Catalin
d947bf75f5 Update CMakeLists.txt 2021-09-06 19:14:09 +03:00
Sandu Liviu Catalin
9cbac142c2 Update CMakeLists.txt 2021-09-06 19:14:01 +03:00
Sandu Liviu Catalin
db9586bc3d Update CMakeLists.txt 2021-09-06 18:48:28 +03:00
3 changed files with 11 additions and 11 deletions

View File

@ -93,10 +93,9 @@ else()
endif() endif()
endif() endif()
# Determine if build mode # Strip binary
if(${CMAKE_BUILD_TYPE} MATCHES "(Debug)+") set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -s -g")
add_compile_options(-g) set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s -g")
endif()
# Enable position independent code # Enable position independent code
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")

View File

@ -175,6 +175,8 @@ if(${CMAKE_BUILD_TYPE} MATCHES "(Release)+")
else() else()
target_compile_definitions(SqModule PRIVATE _DEBUG=1 SQMOD_EXCEPTLOC=1) target_compile_definitions(SqModule PRIVATE _DEBUG=1 SQMOD_EXCEPTLOC=1)
endif() endif()
# Strip binary
set_target_properties(SqModule PROPERTIES LINK_FLAGS_RELEASE -s)
# Force 32-bit binaries when necessary # Force 32-bit binaries when necessary
if(FORCE_32BIT_BIN) if(FORCE_32BIT_BIN)
set_target_properties(SqModule PROPERTIES COMPILE_FLAGS "-m32" LINK_FLAGS "-m32") set_target_properties(SqModule PROPERTIES COMPILE_FLAGS "-m32" LINK_FLAGS "-m32")

View File

@ -86,17 +86,16 @@ set(MAXMINDB_HEADERS
) )
set_target_properties(maxminddb PROPERTIES PUBLIC_HEADER "${MAXMINDB_HEADERS}") set_target_properties(maxminddb PROPERTIES PUBLIC_HEADER "${MAXMINDB_HEADERS}")
install(TARGETS maxminddb #install(TARGETS maxminddb EXPORT maxminddb)
EXPORT maxminddb)
# This is required to work with FetchContent # This is required to work with FetchContent
install(EXPORT maxminddb # install(EXPORT maxminddb
FILE maxminddb-config.cmake # FILE maxminddb-config.cmake
NAMESPACE maxminddb:: # NAMESPACE maxminddb::
DESTINATION lib/cmake/maxminddb) # DESTINATION lib/cmake/maxminddb)
# We always want to build mmdblookup # We always want to build mmdblookup
add_subdirectory(bin) #add_subdirectory(bin)
if (BUILD_TESTING) if (BUILD_TESTING)
enable_testing() enable_testing()