Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
aiekick committed Oct 20, 2023
1 parent f12830f commit b181d78
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set(PROJECT MdlToObj)
set(ORGANIZATION_NAME "FunParadigm")
set(VERSION_MAJOR 0)
set(VERSION_MINOR 1)
set(PROJECT_VER ${VERSION_MAJOR}.${VERSION_MINOR})
set(PROJECT_VER "${VERSION_MAJOR}.${VERSION_MINOR}")

enable_language(C CXX)

Expand All @@ -30,8 +30,9 @@ else()
set(ARCH x32)
endif()

set(FINAL_BIN_DIR ${CMAKE_SOURCE_DIR}/bin)
set(CMAKE_INSTALL_PREFIX "${FINAL_BIN_DIR}")
set(FINAL_BIN_DIR "${CMAKE_SOURCE_DIR}/bin")
set(CMAKE_INSTALL_PREFIX .)
set(CMAKE_INSTALL_BINDIR .)

set(${PROJECT}_OUTPUT_NAME "${PROJECT}_${CMAKE_SYSTEM_NAME}_$<$<CONFIG:Debug>:Debug>$<$<CONFIG:Release>:Release>$<$<CONFIG:MinSizeRel>:MinSizeRel>$<$<CONFIG:RelWithDebInfo>:RelWithDebInfo>_${ARCH}")
set_target_properties(${PROJECT} PROPERTIES OUTPUT_NAME "${${PROJECT}_OUTPUT_NAME}")
Expand All @@ -43,26 +44,24 @@ set_target_properties(${PROJECT} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE "${
### INSTALL #################################################
#############################################################

install(TARGETS ${PROJECT} RUNTIME DESTINATION / COMPONENT APP_BINARY)
install(TARGETS ${PROJECT} RUNTIME DESTINATION .)

#############################################################
### PACKAGE #################################################
## https://gitlab.kitware.com/cmake/community/-/wikis/doc/cpack/Component-Install-With-CPack
#############################################################

set(CPACK_GENERATOR "ZIP")
set(CPACK_MONOLITHIC_INSTALL 1)
set(CPACK_THREADS 8)
if (UNIX)
set(CPACK_SET_DESTDIR ON)
endif()
set(CPACK_ZIP_COMPONENT_INSTALL ON)
set(CPACK_MONOLITHIC_INSTALL 1)
set(CPACK_PACKAGE_VENDOR ${ORGANIZATION_NAME})
set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1)
set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
set(CPACK_PACKAGE_NAME ${PROJECT})
SET(CPACK_OUTPUT_FILE_PREFIX "${CMAKE_INSTALL_PREFIX}/")
set(CPACK_OUTPUT_FILE_PREFIX ${CMAKE_SOURCE_DIR}/bin)
set(CPACK_PACKAGE_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}")

include(CPack)

0 comments on commit b181d78

Please sign in to comment.