Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve CMake files #167

Merged
merged 3 commits into from
Apr 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion CMakeModules/FGInstallDirs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@ endif()

# CMake files
if(NOT DEFINED FG_INSTALL_CMAKE_DIR)
set(FG_INSTALL_CMAKE_DIR "cmake" CACHE PATH "Installation path for CMake files")
if(WIN32)
set(cmake_dir "cmake")
else()
set(cmake_dir "lib/cmake/Forge")
endif()
set(FG_INSTALL_CMAKE_DIR "${cmake_dir}" CACHE PATH "Installation path for CMake files")
endif()

# Use absolute paths (these changes are internal and will not show up in cache)
Expand Down
12 changes: 6 additions & 6 deletions CMakeModules/ForgeConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#=============================================================================

SET(FORGE_VERSION "@FORGE_VERSION@")
SET(Forge_VERSION "@Forge_VERSION@")

@PACKAGE_INIT@

SET_AND_CHECK(FORGE_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/@FG_INSTALL_INC_DIR@")
SET_AND_CHECK(FORGE_LIBRARY_DIRS "${PACKAGE_PREFIX_DIR}/@FG_INSTALL_LIB_DIR@")
SET_AND_CHECK(Forge_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/@FG_INSTALL_INC_DIR@")
SET_AND_CHECK(Forge_LIBRARY_DIRS "${PACKAGE_PREFIX_DIR}/@FG_INSTALL_LIB_DIR@")

FIND_LIBRARY(FORGE_LIBRARIES forge HINTS ${FORGE_LIBRARY_DIRS})
FIND_LIBRARY(Forge_LIBRARIES forge HINTS ${Forge_LIBRARY_DIRS})

INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(FORGE DEFAULT_MSG
FORGE_INCLUDE_DIRS FORGE_LIBRARIES)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Forge DEFAULT_MSG
Forge_INCLUDE_DIRS Forge_LIBRARIES)