forked from ladislav-zezula/StormLib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
+ Public include directories moved to "include" directory
- Loading branch information
Ladislav Zezula
committed
Nov 6, 2016
1 parent
3849673
commit 3c8cc59
Showing
17 changed files
with
81 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
project(StormLib) | ||
cmake_minimum_required(VERSION 2.6) | ||
|
||
include_directories(include) | ||
|
||
set(LIBRARY_NAME storm) | ||
|
||
set(SRC_FILES | ||
|
@@ -301,16 +303,16 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL Linux) | |
endif() | ||
endif() | ||
|
||
option(BUILD_SHARED_LIBS "Compile shared libraries" OFF) | ||
|
||
add_library(${LIBRARY_NAME} ${SRC_FILES} ${SRC_ADDITIONAL_FILES}) | ||
target_link_libraries(${LIBRARY_NAME} ${LINK_LIBS}) | ||
target_compile_definitions(${LIBRARY_NAME} PUBLIC -D__STORMLIB_NO_AUTO_LINK__) #CMake should take care of the linking | ||
target_include_directories(${LIBRARY_NAME} PUBLIC include/) | ||
set_target_properties(${LIBRARY_NAME} PROPERTIES PUBLIC_HEADER "include/StormLib.h;include/StormPort.h") | ||
if(BUILD_SHARED_LIBS) | ||
option(WITH_STATIC "Compile static linked library" OFF) | ||
if(WITH_STATIC) | ||
add_library(${LIBRARY_NAME} STATIC ${SRC_FILES} ${SRC_ADDITIONAL_FILES}) | ||
target_link_libraries(${LIBRARY_NAME} ${LINK_LIBS}) | ||
else() | ||
add_library(${LIBRARY_NAME} SHARED ${SRC_FILES} ${SRC_ADDITIONAL_FILES}) | ||
target_link_libraries(${LIBRARY_NAME} ${LINK_LIBS}) | ||
if(APPLE) | ||
set_target_properties(${LIBRARY_NAME} PROPERTIES FRAMEWORK true) | ||
set_target_properties(${LIBRARY_NAME} PROPERTIES PUBLIC_HEADER "include/StormLib.h include/StormPort.h") | ||
set_target_properties(${LIBRARY_NAME} PROPERTIES LINK_FLAGS "-framework Carbon") | ||
endif() | ||
if(UNIX) | ||
|
@@ -326,42 +328,37 @@ if(BUILD_SHARED_LIBS) | |
if(WIN32) | ||
set_target_properties(${LIBRARY_NAME} PROPERTIES OUTPUT_NAME StormLib) | ||
endif() | ||
endif() | ||
install(TARGETS ${LIBRARY_NAME} | ||
RUNTIME DESTINATION bin | ||
LIBRARY DESTINATION lib | ||
ARCHIVE DESTINATION lib | ||
FRAMEWORK DESTINATION /Library/Frameworks | ||
PUBLIC_HEADER DESTINATION include | ||
INCLUDES DESTINATION include) | ||
|
||
#CPack configurtion | ||
SET(CPACK_GENERATOR "DEB" "RPM") | ||
SET(CPACK_PACKAGE_NAME ${PROJECT_NAME}) | ||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "MPQ manipulation library") | ||
SET(CPACK_PACKAGE_VENDOR "Ladislav Zezula") | ||
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README") | ||
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") | ||
SET(CPACK_PACKAGE_VERSION_MAJOR "${VERSION_MAJOR}") | ||
SET(CPACK_PACKAGE_VERSION_MINOR "${VERSION_MINOR}") | ||
SET(CPACK_PACKAGE_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}") | ||
install(TARGETS ${LIBRARY_NAME} RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib FRAMEWORK DESTINATION /Library/Frameworks) | ||
|
||
#DEB configuration | ||
SET(CPACK_DEBIAN_PACKAGE_SECTION "libs") | ||
SET(CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://www.zezula.net/en/mpq/stormlib.html") | ||
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "[email protected]") | ||
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64") | ||
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "zlib1g,bzip2") | ||
#CPack configurtion | ||
SET(CPACK_GENERATOR "DEB" "RPM") | ||
SET(CPACK_PACKAGE_NAME ${PROJECT_NAME}) | ||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "MPQ manipulation library") | ||
SET(CPACK_PACKAGE_VENDOR "Ladislav Zezula") | ||
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README") | ||
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") | ||
SET(CPACK_PACKAGE_VERSION_MAJOR "${VERSION_MAJOR}") | ||
SET(CPACK_PACKAGE_VERSION_MINOR "${VERSION_MINOR}") | ||
SET(CPACK_PACKAGE_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}") | ||
|
||
#RPM configuration | ||
SET(CPACK_RPM_PACKAGE_RELEASE 1) | ||
SET(CPACK_RPM_PACKAGE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") | ||
SET(CPACK_RPM_PACKAGE_GROUP "${PROJECT_NAME}") | ||
SET(CPACK_RPM_PACKAGE_URL "http://www.zezula.net/en/mpq/stormlib.html") | ||
SET(CPACK_RPM_PACKAGE_REQUIRES "zlib,bzip2") | ||
#DEB configuration | ||
SET(CPACK_DEBIAN_PACKAGE_SECTION "libs") | ||
SET(CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://www.zezula.net/en/mpq/stormlib.html") | ||
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "[email protected]") | ||
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64") | ||
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "zlib1g,bzip2") | ||
|
||
INCLUDE(CPack) | ||
#RPM configuration | ||
SET(CPACK_RPM_PACKAGE_RELEASE 1) | ||
SET(CPACK_RPM_PACKAGE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") | ||
SET(CPACK_RPM_PACKAGE_GROUP "${PROJECT_NAME}") | ||
SET(CPACK_RPM_PACKAGE_URL "http://www.zezula.net/en/mpq/stormlib.html") | ||
SET(CPACK_RPM_PACKAGE_REQUIRES "zlib,bzip2") | ||
|
||
INCLUDE(CPack) | ||
|
||
endif() | ||
|
||
option(WITH_TEST "Compile Test application" OFF) | ||
if(WITH_TEST) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.