Skip to content

Commit

Permalink
Merge pull request #497 from tribal-tec/master
Browse files Browse the repository at this point in the history
Fix install directory of common_application data
  • Loading branch information
Raphael Dumusc authored Jun 28, 2016
2 parents 6c85cb5 + 6bdc7cf commit acc90e9
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 26 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# git master

* [497](https://github.com/Eyescale/CMake/pull/497):
Fix install directory of common_application data
* [494](https://github.com/Eyescale/CMake/pull/494):
Fix include paths in project header file for generated files within the binary dir
* [493](https://github.com/Eyescale/CMake/pull/493):
Expand Down
2 changes: 1 addition & 1 deletion CommonApplication.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function(common_application Name)
file(COPY ${${NAME}_DATA}
DESTINATION ${CMAKE_BINARY_DIR}/share/${PROJECT_NAME}/data)
install(FILES ${${NAME}_DATA}
DESTINATION share/{PROJECT_NAME}/data COMPONENT examples)
DESTINATION share/${PROJECT_NAME}/data COMPONENT examples)
endif()
endif()

Expand Down
50 changes: 25 additions & 25 deletions CommonFindPackage.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,31 +43,6 @@ set(ENV{PKG_CONFIG_PATH}

option(COMMON_FIND_PACKAGE_QUIET "Use QUIET for common_find_package command" ON)

if(WIN32)
set(__system Win32)
endif()
if(APPLE)
set(__system Darwin)
endif()
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
set(__system Linux)
endif()

list(APPEND COMMON_FIND_PACKAGE_DEFINES ${__system})
if(COMMON_USE_CXX03)
list(APPEND COMMON_FIND_PACKAGE_DEFINES ${UPPER_PROJECT_NAME}_USE_CXX03)
else()
list(APPEND COMMON_FIND_PACKAGE_DEFINES ${UPPER_PROJECT_NAME}_USE_CXX11)
endif()

include(TestBigEndian)
test_big_endian(BIGENDIAN)
if(BIGENDIAN)
list(APPEND COMMON_FIND_PACKAGE_DEFINES ${UPPER_PROJECT_NAME}_BIGENDIAN)
else()
list(APPEND COMMON_FIND_PACKAGE_DEFINES ${UPPER_PROJECT_NAME}_LITTLEENDIAN)
endif()

macro(common_find_package Package_Name)
string(TOUPPER ${Package_Name} PACKAGE_NAME)
set(__args ${ARGN}) # ARGN is not a list. make one.
Expand Down Expand Up @@ -199,6 +174,31 @@ macro(common_find_package_disable)
endmacro()

macro(common_find_package_post)
if(WIN32)
set(__system Win32)
endif()
if(APPLE)
set(__system Darwin)
endif()
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
set(__system Linux)
endif()

list(APPEND COMMON_FIND_PACKAGE_DEFINES ${__system})
if(COMMON_USE_CXX03)
list(APPEND COMMON_FIND_PACKAGE_DEFINES ${UPPER_PROJECT_NAME}_USE_CXX03)
else()
list(APPEND COMMON_FIND_PACKAGE_DEFINES ${UPPER_PROJECT_NAME}_USE_CXX11)
endif()

include(TestBigEndian)
test_big_endian(BIGENDIAN)
if(BIGENDIAN)
list(APPEND COMMON_FIND_PACKAGE_DEFINES ${UPPER_PROJECT_NAME}_BIGENDIAN)
else()
list(APPEND COMMON_FIND_PACKAGE_DEFINES ${UPPER_PROJECT_NAME}_LITTLEENDIAN)
endif()

# Write defines.h and options.cmake
if(NOT PROJECT_INCLUDE_NAME)
message(FATAL_ERROR "PROJECT_INCLUDE_NAME not set, old or missing Common.cmake?")
Expand Down

0 comments on commit acc90e9

Please sign in to comment.